U can use bound field. BoundField b = new BoundField(); b.DataField = field name you would like to bind with. b.HeaderText = " "; datagrid.Columns.Add(b);
S
Santhosh N
@Santhosh N
Posts
-
i want to add more than 1 columns with ColumnName=" " in the C#asp.net datagrid after data is bind to it. -
how to know when mouse is clicked on gridview's column header.This code needs to be registered on page load. TableObject.rows[0].onclick = Function("return YourFunctionName(this);"); Here TableObject is ur gridview object rows[0] gives the first row that is the header row. Then write ur logic in "YourFunctionName" Regards Santhosh N
-
how to know when mouse is clicked on gridview's column header.U can get that in Javascript This code needs to be registered on page load. TableObject.rows[0].onclick = Function("return YourFunctionName(this);"); Here TableObject is ur gridview object rows[0] gives the first row that is the header row. Then write ur logic in "YourFunctionName" Regards Santhosh N