One DataSource for multiple controls

后端 未结 4 735
孤独总比滥情好
孤独总比滥情好 2021-01-18 13:47

I have two ListBox in my winforms application, I assigne a datasource for both of them as follow:

private void MakeMeasurementUnits()
{
    var          


        
4条回答
  •  遇见更好的自我
    2021-01-18 14:27

    The behavior you have noted is the default/correct behavior for winforms controls. You can achieve what you are after by setting a new BindingContext for your second listbox control without creating a copy of your data source.

    BindingContext

提交回复
热议问题