web applications - SmartGWT TreeGrid Selection -
I have a SmartGWT web app that uses a datasource with a tree grid. I would like this grid to select the tree saved values in a cookie. I have got the value to save in the cookie correctly, although I tried many different ways of picking tree grids to choose these values. And I can not get it to work. I'm trying to do this on my entry point in the onmoduleLoad method
I tried:
Cookies set cookies to set cookies ("Selected UIIT", Treegrid.Get selected path ())
And then when the page is reloaded:
TreeGrid.setSelectedPaths (Cookies.getCookie ("selectedUnit")
When I could not find it to work, I tried to store the ID only, selected items: cookie cookies ("cookies") GoedAttribute ("id"))
and then attempt to overload it to find that record and select it:
< Pre> TreeGrid.selectRecord (TreeGrid.getTree (). ("Id", Cookies.getCookie ("selectedUnit"))
This does not work either, so Finally, I tried to store a treegrid .customized () and the cookie onload after recovering that value, it triggering. The path selected from the set (), similar to my first attempt. / P>
I could not work on any of these jobs. Can I not tell Trigrid to choose an item in 'Onamod' Ule Load 'method? Is this action valid only after tree grid? If that is the case and how can I do this?
Thank you in advance for any help.
I thought it:
I finished using set (/ received) Happened SelectedState The issue I established was calling by setting up the Selectionstore in the Constructor, that the data was actually trying to set the selected state before it was there. I fixed it by setting an ondataarid handler for the tree and then expanding the tree (to get all the data) and then setting the selected position.
Comments
Post a Comment