I have a datagridview with three columns namly column A, column B, column C.

column A has a column type of DataGridViewTextBoxColumn.

while column B and column C has a column type of DataGridViewComboBoxColumn.

The problem is this....

During form_load I want the column type of column B and column C to be a DataGridViewTextBoxColumn, and when I press the command button for edit I want the column type of column B and column C to DataGridViewComboBoxColumn.

Hope you understand what I mean and thanks for the help.

Hmmm I think you get me wrong... what I mean is how to do it?

I only knew how to change in design mode but I don't know how to change it during runtime.

No, I didnt get you wrong. I know exactly what you meant..

Have you had a look in the actual form generation code? it shows you how its done in there.

PS there is also an alternative way which if you google slaps you in the face like a wet kipper, hence, Im asking you what happens when you try.

This article has been dead for over six months. Start a new discussion instead.