Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by CRW on Jan 08, 2009 09:15
open dhtmlx forum
treegrid returning global userData

Hello,

Thanks again for the help in the past.

On my get xml children calls I want to return non row specific data (specifically, whether an error is called). My idea was to send userdata globally like is shown with the grid xml beastiry; however it did not get that userdata. Is this correct behavior; ie child xml data cannot contain global userdata? If so, is there a way I can indiciate via child xml that an error has occurred server side ? (other than my current way, sending a row with the ID set to 'error' and checking to see if that rowExists).
Answer posted on Jan 08, 2009 09:32
>>Is this correct behavior;
Global userdata parsed only when initial XML loaded, when additional requests executed, for child levels, component will not await any global userdata, it will be ingored.
Basically - such use-case never was expected. 
Answer posted by Support on Jan 08, 2009 09:35
You can store some kind of custom XML marker 

<rows ...>
    <error>Descr</error>
</rows>

mygrid.attachEvent("onXLE",function(){
        var errors=mygrid.xmlLoader.doXPath("//error");
        if (errors.lenght) do_something();
})