I want to add columns in datagridview after some already frozen columns. How can I add it?
I fill datagridview(columns 1 to 8) using dataset on a button click..then I use this dataset as datasource for datagridview. After this I freeze first 8 columns by setting frozen property to true. After this I have one method called "FillCombo" in which all combobox's are filled and are added to datagridview.
Below is the piece of code for filling one combo and then adding to datagridview. Likewise same for other columns is also same..
sql = "Select Description from Category where Catgry = 1"
If rs.State = 1 Then rs.Close()
rs.Open(sql, MainCon, 1, 3)
Do While Not rs.EOF
cmbCaste.HeaderText = "jaita"
cmbCaste.Name = "Caste"
dgvUserDetails.Columns("Caste").DisplayIndex = 10
Don't repost the same question 5 hours later. Show some freakin' patience.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)