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

Programmatically Modifying Bindingsource of a Datagridview Combobox (for a specific row)

$
0
0

I have a databound datagridview control wherein one column is a combobox. This combobox is also databound. For specific rows, I wish to restrict the values in combobox. Since the combobox is databound, the only way is to filter at bindingsource. But the problem is, a single bindingsource is responsible for all the comboboxes and filtering it will permeate to all, which I don't want.

Say we have our bindingsource with these values: Apples, Mangoes, Peaches, Oranges. I want to restrict only Apples and Oranges for the second row. Other rows (i.e. comboboxes in other rows) should be able to select *all* options.

How can I do it?

~

V


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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