DataSource and Listbox/ComboBox
-
I set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method. I'm quite new to .NET Framework classes and used to do this in MFC. Mickey :)
-
I set DataSource for ListBox in my WindowForm by calling set_DataSource and everything is ok. Then I add some data to my data source table and want list box to refresh it's data but nothing works. When I call Hide, then Show methods of ListBox it works but that's very stupid method. I'm quite new to .NET Framework classes and used to do this in MFC. Mickey :)
Have you tried: ControlName.Invalidate(); or ControlName.Refresh(); after you've added, changed your DataSource? not sure this would fix your issue, but it's thought. D.
-
Have you tried: ControlName.Invalidate(); or ControlName.Refresh(); after you've added, changed your DataSource? not sure this would fix your issue, but it's thought. D.
I forgot to write it, but the point is invalidation doesn't work. That was my first idea, but even invalidating dialog doesn't work. I think it has something in common with the method of filling the list. Maybe DataSource method isn't designed for refreshing (would be stupid)? Mickey :)