How I can change DataGridViewColumn type programmatically?
Thanks in advance!
JHG JetLane Tuesday, January 24, 2006 6:14 PM
You can't. The best thing you can do is to create a new column and copy over all the common properties to the new column.
Why do you want to do this?
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout Tuesday, January 24, 2006 6:32 PM
It's not going to be easy. Removing a column removes all the data for the column, so you'll have to save off all the data in the column when you insert the new column and then iterate through each row in the new column and reset the new values.
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout Tuesday, January 24, 2006 8:06 PM
You can't. The best thing you can do is to create a new column and copy over all the common properties to the new column.
Why do you want to do this?
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout Tuesday, January 24, 2006 6:32 PM
I sucessfuly build grouping with DataGridView, but am not able to change column type from DataGridViewTextBoxColumn to treeView programatically. I need this because if I can, then am going to able to change group header.
JHG JetLane Tuesday, January 24, 2006 7:21 PM
It's not going to be easy. Removing a column removes all the data for the column, so you'll have to save off all the data in the column when you insert the new column and then iterate through each row in the new column and reset the new values.
-mark
DataGridView Program Manager
Microsoft
This post is provided "as-is"
Mark Rideout Tuesday, January 24, 2006 8:06 PM
Hi , May youplease review my thread under this link