DataGrid Column Name
-
I am working with datagrid in ASP.NET application. I want to name a column Product but since this column is named ProductName in DataBase, I am not able to change the name in DataGrid Header. I found a work arround to it by using "as Product" in select statement but is there a way to change the Header Text of a datagrid programatically insted of changing the slect statement? I sure would appreciate your help. Thanks.
-
I am working with datagrid in ASP.NET application. I want to name a column Product but since this column is named ProductName in DataBase, I am not able to change the name in DataGrid Header. I found a work arround to it by using "as Product" in select statement but is there a way to change the Header Text of a datagrid programatically insted of changing the slect statement? I sure would appreciate your help. Thanks.
-
I am working with datagrid in ASP.NET application. I want to name a column Product but since this column is named ProductName in DataBase, I am not able to change the name in DataGrid Header. I found a work arround to it by using "as Product" in select statement but is there a way to change the Header Text of a datagrid programatically insted of changing the slect statement? I sure would appreciate your help. Thanks.
-
Hi there, Every column in the DataGrid control has the HeaderText[^] property which allows you to set the header text for the column. You can set the header text in the Properties Windows, Html editor or in code.
Thank you very much!