row index error

I have an issue with first row of grid. It seems to not find my first row id or userdata.



Is this a common issue? Is there something I can do to fix it?





mygrid.getUserData(mygrid.getRowIndex(mygrid.getSelectedId()),“irowdata”)



returns nothing for first row



Thanks

In which moment you are calling this code line?
The loading of grid is async. , so be sure that grid loaded on moment of command call ( you can use onXLE event or second param of loadXML to catch the moment when data loaded from XML )

Also, please be sure that each row has unique ID , in other case command will fail.

If problem still occurs - please provide used XML, for which error occurs.