View Full Version : Overwrite a grid by a detail grid when users click on a row
11 Apr 2012, 12:14 AM
I have a parent grid which contains some rows. When users click on 1 rows, I will replace the current grid by a detail grid of the row selected. How can I do it?
I don't know if we have a function replace which will replace a grid panel by another grid panel with some input parameters?
11 Apr 2012, 12:21 AM
One of the solution for your requirement is destroy the parent grid and create child grid in place. Another solution for that is put parent grid in one tab and open its child grids in other tabs.
11 Apr 2012, 2:46 AM
Thanks for your reply. Do you have a sample code for "destroying" the parent grid and load the child grid?
11 Apr 2012, 4:16 AM
A better solution might be to use a parent panel with an Ext.layout.container.Card layout. Put your master grid in the first child panel and your detail grid in the second child panel. In the itemdblclick event of the master grid, you can dynamically load the detail grid, then switch to the second child panel.
When the user is finished with the details grid, they can click a 'close' button (or whatever you like), which simply switches them back to the master grid.
This will be lots more efficient in terms of memory utilization on the browser.
12 Apr 2012, 12:07 AM
I did it with add and remove panel. But yours is a good idea.
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.