onPageChanged strange behavior

Hello! I used mygrid.load (“myconnector.cfm”); to load the records into a grid (mygrid) and then always in the block
dhtmlxEvent (window, “load”, function () {
I attached the event onPageChanged to my grid
mygrid.attachEvent (“onPageChanged”, function (ind, find, Lind) {
When I press the button with the page number the grid is updated but the script inside the function onPageChanged event is not executed, the second time instead of pressing the same button, the script runs … The same thing happened for the event onCellChanged …

I also tried with only a simple flag: window.alert (“MyFlag”); to exclude all doubt …

Thanks a lot

Unfortunately the issue cannot be reproduced locally.
If the problem still occurs for you please, provide with a complete demo, or a demo link, where the issue can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

The problem persists after the first range of records in pages defined with <cfset grid.dynamic_loading (N)>… After when the next page is selected the childIndexes property is not available until the next time you access in the same page…
Here a link to a demo:
In the <cfset grid.dynamic_loading(108)> I’ve defined 108 records = 4 pages of 27 records.The problem will start from the fifth page


On your page you are operating with grid data from the onPageChanged event.
function myFavIconsLoader(ind,fInd,lInd){
var NumItem = 0;
for(i=fInd; i<=lInd; i++){
var rowID = mygrid.getRowId(i);

Unfortunately in case of dynamic loading such feature is not available as the event occurs before the portion of the new data is loaded to the grid

Thank you very much.I will find another way … The components are quite powerful, if you have suggestions or updates I will be happy to receive them.


I did it…onPageChanged load global variables and start the function for loading images into div when data is already ready. But when the data is not ready yet for onPageChange will be the onXLE event that will start the function for… and send the global variables that onPageChanged had loaded… Seems to work… :smiley: