Parent gridview for company detail and child gridview for its executive detail.
Main this is that in both gridview columns are dynamic, means use can choose that which column its want by checkboxes which are on the previous page.
Here i am not using Eval function because columns are dynamicaly decide on run time.
In the below image there are two Gridview first gridridview have dynamic columns and second gridview have fix columns. But these is no problem in second gridview designing , because in this do to fix columns i can use eval function and put it inside table etc.
but in the first i m not using Eval do to Dynamic columns The above code is for first gridview. I want to display it like second gridview. is there a way to use eval dynamicaly or suggest me other way to solve this designing problem.



Suthish NairRank #92 · 22.8K reputationPosted Apr 18, 2011, 11:26 AM EDT
The best way i can suggest is to use asp.net repeater control.
You need to create dynamic html's to achieve this instead of nested gridview.
First of all create/design an static .html file same as the output you needed.
Later implement it using repeater control.
Another way,
Use an Label control instead of Grid View. On RowDataBound event generate the htmls and bind to Label.Text.
using System.Text;
Raja KrishnamurthyRank #3,615 · 403 reputationPosted Apr 18, 2011, 3:16 AM EDT
http://www.codeproject.com/KB/webforms/GridViewInsideGridView.aspx
HTH
Karthikeyan AnbarasanRank #71 · 25.5K reputationPosted Apr 18, 2011, 3:23 AM EDT
Ankit NandekarRank #703 · 3.4K reputationPosted Apr 18, 2011, 3:33 AM EDT
Vikas AhlawatRank #2,648 · 525 reputationPosted Apr 18, 2011, 3:35 AM EDT
In this example no of columns are fix.
I want want dynamic gridview with style.
currently my gridview is dynamic but it looks is not good.