Grid and Userdata

I use the LoadXML for Grid with the PRO component.



Userdata tag works only within the tag



if string looks like this:

SOME

it does not work.



Seems that XML string must have the structure:

DATAtest



Please, can give a slution to this?



Thanks in advance,

John

Actually for initial data loading userdata tag may be place as within row tag, as a child of rows tag
In second case , userdata will be assigned to whole grid and can be retrieved as

SOME

grid.getUserData("",“ID”)

If issue still occurs for you - please provide info about used version of dhtmlxgrid.


Yes, I use it as your sample and it still occurs!



My Grid version:



dhtmlxGrid v.2.0 Professional edition build 81009/81107



 



Thanks,



John

Please check attached sample.

Beware that xml loading is async. , which means that you need to catch the moment of data loading before executing any api calls against the data. ( you can use onXLE event or second parameter of loadXML method )

1232546085.zip (78.8 KB)


Now it is working, but most possible to be the last you said, “catch the moment of data loading before…”



Thank you anyway,



John