change datagridview column name
-
Hi, i have a datagridview and have bounded my datasource. When the gridview is loaded, the column name follows the table attributes name. example catID desc catName I want to rename the column to Cat ID, Description, Category Name How do i do that?
-
Hi, i have a datagridview and have bounded my datasource. When the gridview is loaded, the column name follows the table attributes name. example catID desc catName I want to rename the column to Cat ID, Description, Category Name How do i do that?
I assume you are talking about the column headers in the datagrid. you can use the column aliases to rename your columns before binding the datasource to the dataset in design mode. if you already have a bounded datasource then You can rename the column headers of the datagrid by using the following sample code MyDataGrid.Columns["catID"].HeaderText = "Cat ID"; MyDataGrid.Columns["desc"].HeaderText = "Description"; MyDataGrid.Columns[2].HeaderText = "Category Name";
-
Hi, i have a datagridview and have bounded my datasource. When the gridview is loaded, the column name follows the table attributes name. example catID desc catName I want to rename the column to Cat ID, Description, Category Name How do i do that?
why don´t you do it in sql???:confused:
-
why don´t you do it in sql???:confused:
meaning?