Updatind persistent objects

2 posts, 0 answers
  1. Anatol
    Anatol avatar
    4 posts
    Member since:
    Jul 2010

    Posted 22 Sep 2010 Link to this post

    I have BindingList<> which is filled from the database. When I edit/delete the record from the grid which shows this list in UI and commit the transaction, it has no effect in database, but BindingList contains all changes. After deleting record I have no object which I can remove from the scope.
    Should I realise event handlers like RecordsDeleting / CellUpdated in my datagrid component for manually removing objects from scope or there is other ways to get the same functionality?
  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 24 Sep 2010 Link to this post

    Hi 1,

    You should handle the RadGridView.DataBindings.CollectionChanged event. There you should just commit the transaction so you can persist the changes to the database:

    protected void DataBindings_CollectionChanged(object sender, CollectionChangeEventArgs e)
        if (scope.Transaction.IsActive)

    Hope that helps.

    Best wishes,
    Damyan Bogoev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top