Click here to Skip to main content
15,917,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to click on the grid row and want to show another grid on the click of that row how it can be solved
Posted

You can put a GridView inside a TempateField of your Main Grid. Hide it. Using CommandName and CommandArgumment Hide & Show that child Grid.

Another solution, most elegant that I explain you is: GridView inline Master/Detail record display[^]

Hope it helps
 
Share this answer
 
Comments
[no name] 8-Aug-12 8:21am    
no its not my question i want to open another grid when i click on the grid1
Christian Amado 8-Aug-12 8:29am    
What about a popup? Are you using AJAX? You can use the DataKeyNames property and fill the second grid with the respective data.
 
Share this answer
 
Comments
[no name] 8-Aug-12 8:54am    
no its not helpfull
_Amy 8-Aug-12 8:58am    
How you want to show other grid? as a popup or in same page. Popup means you can take linkbutton or hyperlink to select the row and show the grid in popup or in the page(In page -> you need to reload the page).
[no name] 8-Aug-12 9:12am    
not in the popup i want to show another grid below 1st one grid
_Amy 8-Aug-12 9:18am    
Handle selectedindexchanged Event of gridview and bind the second grid and show that.
Refer : http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged.aspx[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900