I have a Grid and a Form with a Select Item. The Grid and the Form are bound.
The data laod over dhtmlXDataStore. The Form load the structur from a xml. One item is as select item which is loaded over the java SelectOptionsConnector.
When a start the application, I try to select the first item in the Grid and it should show the details in the form, also slelect the right item in the “select” item. I found no way…
Can you help?
The mainproblem is, that the select item shows not then right item. Always the first item in the list. A click on the grid reload then the right item.
Issue must be caused by order of data loading , if you have selected first record in grid, before data for form options are loaded - it will not be able to select the necessary options, as options are not loaded yet.
But how know I when the data are loaded? It’s not possible to the define the event XLE behind the load select item. I defined the related connector is defined in the form structur.
Order should be:
Load Form structure (with select item) and Datastore data.
Load select items (connector is defined in the form structure)
Then the problem:
Select first item in the grid… but how know I when the “select item” data are loaded? There is no event to be define…
you can use
form.attachEvent("onOptionsLoaded", function(){
//options are ready, now you can selecte item in master store
... code here ...
});
It works…
and how can I reload the select items?
I think I should start with the whole idea:
I try to create a app like the attached image. It works more or less but I have a few tricky issues:
When I activate another item in the Accordion it should reload the datastore data behind the grid(sync) and form(bind), all select items in the form an finally select the first item in the grid. It should allways reload all datas (select items to!) if I active the accordion item. The Form activation works with views…
All definitions (grid and form) are saved in a xml file. The datastore loads the data over the java connector.
When I add a new dataset, it should select the new dataset in the grid.
Can you give me the order for loading and activation?