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
2265
Clicking Save on Ribbon when adding new bound Object
posted

Hi,

I have the following scenario where I have a list that is bound to a System.Windows.Forms.BindingSource which is then bound on the Infragistics Grid.  I have a Ribbon on the Form with a ButtonTool which Saves my data.

Rows are added to the grid using a Band.Override.AllowAddNew = FixedAddRowOnTop.

However, if I am in the process of adding a new row and click the Save button, the Row has not been updated.  No events are fired.  I need to know a way I can inform the grid to validate the row before updating before Save can do anything.  Events Leave, LostFocus, Validating, BeforeRowUpdated are not fired.

Thanks,

Andez

 

 

 

 

 

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Andez,

    The grid commits changes to the current row when the grid either loses focus or changes active rows.

    Clicking on a Ribbon or toolbar button does neither of these, because ribbons and toolbars do not take focus (so the grid does not lose focus).

    So what you have to do is call grid.UpdateData() before you save, to manually tell the grid to commit the changes.

Reply Children
No Data