sjivan
20 Dec 2006, 2:35 PM
I posted some questions in a thread which was categoried under "Feature Requests" but I think it deserves a new thread.
In the master detail grid, when I select say the second row and then update the details, I want the details to be updated in grid too. I'm presently relaoding the grid after I save the detail but as a result the selection in the grid gets reset to the first row, consequently causing the detail to switch as well.
Are you preserving the user's original selection when the detail is saved? If so, how are you handling this? Also what if the user adds a new row in a paged table when the user is viewing page 1 (of 3). The new record would be added to the end so I'm not sure how best to handle this. Should we go to page 3 with the newly added record selected? It doesnt seem the best solution.
Other options I'm considering are :
1. Show details on row roubleclick as opposed to selection model 'rowselect'. The user interaction would still a little confusing if he edited an existing record and saved it as the table selection would go to the first row while the details would a) either be reset to row 1's detail or b) remain the details of the edited row.
2. On edit of existing row, manually update the grid's data model too. This behavior would probably be what the user expects. For newly added rows, the just go to the end and may not be visible if the user is on page 1 (of 3). I think this is what Jacks XML Binding example does but the complication this introduces is the grid model is updated by the detail and to propagate the changes from the grid to the server, the data model contents need to be posted and the server may end up requiring to update all rows, even though only one might have changed. Either that, or additional book keeping would be required in the XMLDataModel to track state changes (which may get messy?)
In my use case, not all 'details' are dispalyed in the grid. Only some of the fields are dispalyed in the master table.
If all fields were present in the grid, I could just use and editable grid.
Comments or suggestions appreciated.
Thanks,
Sanjiv
In the master detail grid, when I select say the second row and then update the details, I want the details to be updated in grid too. I'm presently relaoding the grid after I save the detail but as a result the selection in the grid gets reset to the first row, consequently causing the detail to switch as well.
Are you preserving the user's original selection when the detail is saved? If so, how are you handling this? Also what if the user adds a new row in a paged table when the user is viewing page 1 (of 3). The new record would be added to the end so I'm not sure how best to handle this. Should we go to page 3 with the newly added record selected? It doesnt seem the best solution.
Other options I'm considering are :
1. Show details on row roubleclick as opposed to selection model 'rowselect'. The user interaction would still a little confusing if he edited an existing record and saved it as the table selection would go to the first row while the details would a) either be reset to row 1's detail or b) remain the details of the edited row.
2. On edit of existing row, manually update the grid's data model too. This behavior would probably be what the user expects. For newly added rows, the just go to the end and may not be visible if the user is on page 1 (of 3). I think this is what Jacks XML Binding example does but the complication this introduces is the grid model is updated by the detail and to propagate the changes from the grid to the server, the data model contents need to be posted and the server may end up requiring to update all rows, even though only one might have changed. Either that, or additional book keeping would be required in the XMLDataModel to track state changes (which may get messy?)
In my use case, not all 'details' are dispalyed in the grid. Only some of the fields are dispalyed in the master table.
If all fields were present in the grid, I could just use and editable grid.
Comments or suggestions appreciated.
Thanks,
Sanjiv