Was wondering if there is a way to access a callback onRender of an item, in my case a ListGrid?
I've found that the callback executed when data is returned from a listGrid operation, ie click: function() {...}, that the sort operation does not properly sort. I'm unsure why, so I believe it would beneficial to apply the listGird.sort() operation post-rendering(and, I assume, re-render thereafter). Is that possible?
To explain the user-case, the problem is that when Adding a new row (actually, INSERTING a row) provided that the server data is perfect, the .sort() method does not properly display. It seems to be leaving the new row just below the previous item.
Here's some information that may help describing this... (Where "ID" is the primaryKey)
Table is:
So I then insert a row "Above selection" of ID 2, So i select 2, and "insert"(via Button click).
In PHP, this means the NEW data is assigned an ID of 2, and ID 2 & 3 are shifted +1, making the following:
It looks perfect here in theory. And server-side this is completely accurate. ListGrid.invalidateCache() proves this correct, so the data is right, but the Display is NOT.
Without .sort() i get the following display:
and with sort, i get the following:
The PHP DSRequest provides a DSResponse including JUST
as is correct according to documentation for an ADD operation.
So, therefore, I would like to be able to perform the sort operation POST rendering, such that I can diagnose why this is occurring.
Assuming .invalidateCache() is a requirement here, I still need a Post-Render callback, because:
.invalidateCache() executes after .selectSingleRecord() - meaning it (apparently) invalidates the cache, selects the row, and thereafter redraws. Thus -- nothing is selected.
Even if the order is as follows in the DSResponse button-click callback:
Is there a post-render callback option in SmartClient 8.1 LGPL?
I've found that the callback executed when data is returned from a listGrid operation, ie click: function() {...}, that the sort operation does not properly sort. I'm unsure why, so I believe it would beneficial to apply the listGird.sort() operation post-rendering(and, I assume, re-render thereafter). Is that possible?
To explain the user-case, the problem is that when Adding a new row (actually, INSERTING a row) provided that the server data is perfect, the .sort() method does not properly display. It seems to be leaving the new row just below the previous item.
Here's some information that may help describing this... (Where "ID" is the primaryKey)
Table is:
Code:
ID aTitle SomeStuff 1 "a" "stuff for a" 2 "b" "stuff for b" 3 "c" "stuff for c"
In PHP, this means the NEW data is assigned an ID of 2, and ID 2 & 3 are shifted +1, making the following:
Code:
ID aTitle SomeStuff 1 "a" "stuff for a" 2 "new" "new stuff" 3 "b" "stuff for b" 4 "c" "stuff for c"
Without .sort() i get the following display:
Code:
ID aTitle SomeStuff 1 "a" "stuff for a" 3 "b" "stuff for b" 4 "c" "stuff for c" 2 "new" "new stuff"
Code:
ID aTitle SomeStuff 1 "a" "stuff for a" 3 "b" "stuff for b" 2 "new" "new stuff" 4 "c" "stuff for c"
Code:
2 "new" "new stuff"
So, therefore, I would like to be able to perform the sort operation POST rendering, such that I can diagnose why this is occurring.
Assuming .invalidateCache() is a requirement here, I still need a Post-Render callback, because:
.invalidateCache() executes after .selectSingleRecord() - meaning it (apparently) invalidates the cache, selects the row, and thereafter redraws. Thus -- nothing is selected.
Even if the order is as follows in the DSResponse button-click callback:
Code:
grid.invalidateCache(); // woot it now displays right grid.selectSingleRecord(..id..); // Hmm... doesn't appear to select anything at all, regardless of supplied ID. Disabling .invCache shows this works fine, except when executing .invCache
Comment