Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

How can I fill a Combobox in a datagridview? C#

$
0
0

I have made by code a datagridview. This datagridview has several comboboxes.

I want to populate this comboboxes at runtime. But I don't know how.

The code I tried:

NaardataGridView2.CurrentCell.Value = getKolommen(selVanTabellen);

 

getKolommen give a datatable with names. The above code doesn't work. I want something like:

NaardataGridView2.CurrentCell.DataSource = getKolommen(selVanTabellen);

 

Can some one help me?

 


Viewing all articles
Browse latest Browse all 12583

Trending Articles



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