I am using Infragistics UltraGrid with BindingList. My bindingList gets populated by a stored procedure based on the inputs from the users. Users can select values which fires the stored procedure and repopulates the BindingList with new values.Every thing works fine except that the ultragrid doesn't get refreshed with this new set of values. Please suggest.
Thanks for responding Mike. That does make sense. i ended up using a timer.
Al
Hi Al,
DataSets and DataTables implement IBindingList. So any changes you make to the DataTable will be reflected in the grid automatically. You don't have to do anything.
If that's not working, then something is wrong. Maybe you are updating the back end and not the DataTable? Or maybe your code is updating the wrong DataTable (one that isn't bound to the grid).
I strongly advise against using threading with data bound controls. It's pretty much impossible to do this safely because when you use threads you must marhsal the data from one thread to the other and in the case of data binding, you are no in control of the communication between the UI and the background thread. The grid can access the data source at any time without your knowledge so proper marshaling is impossible and will almost certainly cause your application to crash in ways that are extremely difficult to debug.
hey Mike, sorry to resurrect an old thread but i'm seeing so much out there on this topic but nothing is working.
i'm binding an ultrawingrid (13.2) to a dataset with two tables that have a relation object. All i want to do is auto refresh the data in the background preferably on background thread but if ui thread is quick that is fine.
i don't want to set the datasource everytime because that completely wipes everything out. any way i can do this effectively? does datatable implement notification? doesn't seem to happen for me.
any help is appreciated.
I figured it out. It's not issue with binding.
I have user control which i was not disposing that causes this issue.
Thanks
Hi,
You don't need to Refresh anything if you are setting the grid's DataSource. Setting the DataSource property will implicitly refresh the display.
I can think of no reason why this would not work. Can you post a sample demonstrating the issue?