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
145
Supplying default values and validating added rows using binding navigator
posted

Hi,

I am using UltraGrid with a BindingNavigator.  When adding a new record  with the BindingNavigator AddNewItem button I would like to supply default values to two cell in the new record.  I have gotten this to work by using the AfterCellActivate event,  it works but doesn't seem correct.  I tried to initialize the default values with the grid but this didn't work.

After I edit the new row I want to validate the data when  saving the changes with the BindingNavigator  SaveItem button.  I tried to run my code in the AfterRowInsert and AfterRowUpdate event, but they didn't fire.  I can validate the data in the SaveItem code but unless I move the focus off the last cell in the new record to a different cell in the new record the code that tests the cell see that last value as DBNull. 

Thanks for the Help

Adam

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    AfterRowInsert and AfterRowUpdate only fire when the user inserts or updates a row through the grid. If you are doing this through the BindingNavigator, then you would have to use some event of the BindingNavigator itself or perhaps the DataSource.

Children