I want to bind not all but one part of columns of a DataSource to a GridView, but I do not know which function can be used?
For example, the following code is used to bind all columns of database "Departments" to GridView departmentsGrid.
Departments
departmentsGrid
departmentsGrid.DataSource = dataSet.Tables["Departments"].DefaultView; departmentsGrid.DataBind();
Note that for the GridView, I have set "AutoGenerateColumns" as True.
AutoGenerateColumns
Therefore, I have to select all the columns to bind. Perhaps, I can set "AutoGenerateColumns" as False and then bind the columns one by one?
Or is there any better solution?
Thank you!
RowDataBound
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)