We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Databinding question...

Greetings, I have a bulk entry screen with a databound grid on it. The users have the ability to add, edit, delete rows from the grid. While testing my users are a little unhappy with the default behavior of adding rows. Here is a test scenerio. User inputs one complete new row of data into the first row. However, until the user move to the next row the data is not committed to my datasource(i.e. the little pencil in the left hand grey area is showing). So when they hit save, no data is in my datasource. What I would like is that when the user types anything into the grid it is immediately recognized in the datasource. Is there some sort of binding context setting to accomplish this? I guess I could loop through the grid rows themselves. Suggestions?! Cheers, JF

1 Reply

AD Administrator Syncfusion Team February 3, 2005 09:32 PM UTC

Hi Jim, it normally should be sufficient if both your Save button and the grid control have .CausesValidation property set to true. In such scenario the grid''s Validate method will get called which then will commit changes in the AddNew row to the underlying datasource. If the Save command is a menu handler or toolbar button you need to manually call Form.Validate(). If you manually want to commit changes in the AddNewRow you can call GridDataBoundGrid.Binder.EndEdit() Stefan

Loader.
Live Chat Icon For mobile
Up arrow icon