How to build Nested Grid View dynamically?

Posted by Vinith under ASP.NET on 5/15/2011 | Points: 10 | Views : 14220 | Status : [Member] | Replies : 5
Hi,

Any one please guide me to build an nested grid view dynamically upto n levels..

If sample code is appreciated...


Thanks
Vinith Anthony

Vinith Anthony


Responses

Posted by: Puneet20884 on: 5/15/2011 [Member] Bronze | Points: 25

Up
0
Down
A good question.

I'am hereby giving you 2 simple steps to accomplish this, if doesnt work, please confirm.

1) Bind the main grid with your master data.
2) On the master grid's rowdatabound event, add a new grid view to each row by creating a new one for every grid and assign an event of rowdatabound to it and in that rowdatabound, add another grid and the same rowdatabound event to it as well so it will repeat till the n level. Do all this programmaticly.

Best Regards,
Puneet Sharma - Infosys
Pune, India

Vinith, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 5/16/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Vinith,

Use the below links sample as the base version... This is an excellent example to build mutilevel grdi view

http://www.codeproject.com/KB/aspnet/MultiNestMDGridview.aspx

Thanks
Karthik
www.f5Debug.net

Vinith, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 5/24/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

Refer this link,


http://msdn.microsoft.com/en-us/library/aa992038.aspx

Regards,
Susan

Vinith, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vinith on: 10/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi KaRTHIK,
Thanks it works..

Vinith Anthony

Vinith, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kaushikmaheta on: 10/26/2012 [Member] Starter | Points: 25

Up
0
Down
see this link more helpfull
http://www.aspdotnet-suresh.com/2012/05/gridview-with-in-gridview-or-nested.html

Regards
Kaushik Maheta

Vinith, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response