Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
775
Grid Row Refresh Issue
posted

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

 

Parents
  • 469350
    Suggested Answer
    Offline posted

    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.

Reply Children