Saturday 5 July 2014

Adding dynamic field in gridview in C#

Adding dynamic field in gridview
1. Create the new Gridview control.
2. At the required position or event just create the object for the BoundField.
3. Set the DataField and HeaderText for the column (can add other properties also like following code).

4. After creating boundfield, add that bound field to gridview by following two different statement.