adding columns to grid view programatically
-
Hi all I want to create a grid view control which inherits from grid view. Now after i bind it datasource i want to hide some columns from gridview. also i want to add some controls like checkbox ,dropdownlist. How do i do this programatically.i dont want to do this using design view. Please suggest which methods should i override and how do i create template here.. Waiting for answer Tejesh
-
Hi all I want to create a grid view control which inherits from grid view. Now after i bind it datasource i want to hide some columns from gridview. also i want to add some controls like checkbox ,dropdownlist. How do i do this programatically.i dont want to do this using design view. Please suggest which methods should i override and how do i create template here.. Waiting for answer Tejesh
Try this: DataGridViewCheckBoxColumn col = new DataGridViewCheckBoxColumn(); col. (fill the properties) dataGridView1.Columns.Add(col);