Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

DataGridView Change a column data type from text to combobox at runtime

$
0
0

Hello everyone,

I am a newbie to C# and VS2010. I have been looking online for few days now and not a single solution I found address the "DataGridView Change a column data type from text to combobox at runtime". All the code I found is to add a column to the grid. I could not find any code on how to update an existing column.

I am not talking adding a new column. I am not talking removing that text column and add a new column.

I just want to replace the datatype at run time for one grid column.

At runtime I create a table object and fill from text file.

I assign the datasource to the grid. And all columns are filled from that table.

Then I see on my grid MyName, MyCode, MyType, MyValue. All filled with data nice and neat. So far so great.

The question is. I want to change the datatype on column MyType to be a combobox with values "TXT" and "PDF".

How do I do that?


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>