Question : How do I add a column of drop down lists to a gridview bound in code-behind?

Hi experts..

I have a gridview that I bind with data from a database query in code-behind. (VB.net)

I now need to add a column of drop down lists to this gridview.

I'm not sure how to go about this...

Any one got the answer???

thanks in advance..

Answer : How do I add a column of drop down lists to a gridview bound in code-behind?

If you are using DataGridView in VB 2008 or VB 2010, then the following code will work for you:
1:
2:
3:
        Dim newColumn As New DataGridViewComboBoxColumn
        newColumn.HeaderText = "New Column"
        DataGridView1.Columns.Add(newColumn)
Random Solutions  
 
programming4us programming4us