Ok - this is resolved.
The SlickGrid - when it put the row back - appears to disconnect the star image from the DOM. The event still fires - as I've shown - but the image is not in the DOM anymore so I cannot poll it for what row and such it is related to.
I did discover that the SlickGrid creation code I was using had an onCellChange event - when that happens I "store" the row and other info in some variables attached to the WINDOW object (some globals as they would be called in other languages).
With that said - now if the STAR image is no longer attached to the DOM I know I can rely on those global variables to tell me which row was hot when the star was clicked. If the star is on a row that is not "in a change" moment then that star is attached to the dom and I can poll it for information. The only way the star can be detached is if the current row was "in a change" when the star was clicked...Code:function makeGrid(objGrid, sender, objWebParam) { . . . wesPanel = $(strPanel); . . . g_objGrid[intGO].onCellChange = function(currentRow, currentCell, item) { g_lastintGO = intGO; g_lastintRow = currentRow; g_lastwesPanel = wesPanel; toggleButton(true, $("#" + strPanelHeading + " .acs-panel-btn-save")); changeCell(currentRow, currentCell, item); if (g_objGrid[intGO].formula) { try { g_objGrid[intGO].formula(currentRow, currentCell, item); } catch (e) { errorMessage("onCellChange>formula", e); } finally { } this.updateRow(currentRow); } };
Code:function addstarClick(event) { if (g_blnInSproc) { alert("Processing - please wait!"); } else { g_blnInSproc = true; var wesThis = $(this); var wesSave = wesThis.closest('.acs-panel-work').find('.acs-panel-btn-save'); var objWebParam = {}; var intGO = 0; var intRow = 0; if (wesSave.length == 0) { wesSave = g_lastwesPanel.find('.acs-panel-btn-save'); objWebParam = g_lastwesPanel.closest('.acs-ddreflector').data('objWebParam'); intGO = g_lastintGO; intRow = g_lastintRow; } else { objWebParam = wesThis.closest('.acs-ddreflector').data('objWebParam'); intGO = wesThis.closest('.acs-ddreflector').data('objWebParam').gridoffset; intRow = parseInt(wesThis.closest(".slick-row").attr("row"), 10); // and what row I am on } p_saveClick(wesSave, { addstar: true, nomsg: true, intGO: intGO, intRow: intRow }); return false;




Reply With Quote