Hi,
My actual issue is exactly the same as the issue in this post: http://forums.infragistics.com/forums/p/33155/181098.aspx#181098. The only difference is that in the other forum post the user was binding to a calculated column being updated by a SQL Server call. That is NOT the case here ...
To recap quickly, I have an application that has multiple grids and win forms. A certain number of them bind to the same data table underneath. When I go to update a field in one of the win forms, I expect that same field in the grids to be updated as well since they are bound to the same data column. What I instead have to do is to click on another record in one of the grids and then click back to the record that was updated to see the change. I'm actually expecting that as soon as I tab off the field in the win form the same field in the grids is updated.
In the other forum post it was mentioned that this could be caused by the binding not sending a notification to the other controls to refresh. What would cause this to happen? What would be a fix that could be applied to correct this?
To answer some of the questions Mike had in the other forum post: The typical example in my application is an Order Qty field. If the user changes the value in the win form in the UltraNumericEditor control that is bound to the order quantity data column, the order quantity in the grid columns (also bound to the order quantity data column) do not update when the user tabs out of the UltraNumericEditor. The property I'm binding to for this field is the "Text" property.
Any help solving this issue would be greatly appreciated.
Thank you,
Steve
Hi Steve,
What kind of data source are you using here?
Let's take a simple example.. suppose I have a single grid on a form bound to some data source. When I do something (like click a button), I show a form with fields bound to the same data with individual controls like TextBoxes.
To make this work, the form I show would have to be bound to the same DataSource that the grid is using. And that DataSource has to be a robust data source that implement IBindingList. If it's just an IList, it won't work, because it will not notify the bound controls that things have changed.
Also, I'm pretty sure this won't work unless both the grid and the controls on the form have the same BindingContext. So you may need to set the BindingContext on the edit form to the same BindingContext that the grid is using. In fact, I'm not sure if just setting the BindingContext of the form will work. I think it will, because I'm pretty sure the controls on the form will get their BindingContext from their container... but you might have to set it on each control if the controls ar not directly on the form.
Hi Mike ... The data source I'm using is a dataset made up of temp-tables from a database. My forms and grids are bound to the same data source... In doing some more testing, it looks like the binding is working correctly as the underlying data tables get updated immediately when I change a value in the form or in the grid, and eventually the correct data appears in all the appropriate places ... However, I noticed that when I update a field on the form and then move my cursor so that it hovers over the same field in the grid, the grid refreshes and displays the updated value. It seems like there is a "lazy" refresh occurring for the grid. Is this a grid setting that you know of? ... Also, another curious thing I noticed is that the very first time I make a change in the form after bringing the application up, all the grids refresh and display the updated values correctly. But every subsequent change no longer appears immediately in the grids and the only way to get the changes to show is to hover over the field in the grid or click onto another record and then click back to the one I was editing. ... Any additional help you can give me to solve this mystery would be greatly appreciated.
Thanks!