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 NairPosted Apr 18, 2011, 3:26 PM
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;
Vikas AhlawatPosted Apr 18, 2011, 7:35 AM
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.
Ankit NandekarPosted Apr 18, 2011, 7:33 AM
Karthikeyan AnbarasanPosted Apr 18, 2011, 7:23 AM
Raja KrishnamurthyPosted Apr 18, 2011, 7:16 AM
http://www.codeproject.com/KB/webforms/GridViewInsideGridView.aspx
HTH