C# WinForms - filtering one combobox based on the value of another combobox in a databound datagridview

后端 未结 4 1752
我在风中等你
我在风中等你 2021-01-23 00:55

I have 4 tables - Agents, Customers, Counties and Towns. Agents and Customers both have a Town field and a County field. I have a DataGridView for each table. These are working

4条回答
  •  死守一世寂寞
    2021-01-23 01:24

    How is your data bound? If you use a DataView you can specify the RowFilter property and then refresh the underlying data. The rowfilter property works like a where clause and only returns a subset of the actual data.

    A little background on DataView

提交回复
热议问题