How to get modifed rows(i.e. Dirty rows) from RadGrid Template column view

7 posts, 1 answers
  1. systems
    systems avatar
    71 posts
    Member since:
    Dec 2013

    Posted 03 Sep 2015 Link to this post

    Hello,

    We have a in place editable grid with Template columns & with single save button outside the grid. Usually grid consist of monthly dates and I need to update/edit only few dates from it. 

    I am looking to find out a way through which i can get only modified rows from grid in my save button handler. I know by default there is no IsDirty flag for RadGridRow so any thoughts around accomplishing this?

    Thanks,

    Chetan

  2. Eyup
    Admin
    Eyup avatar
    3962 posts

    Posted 08 Sep 2015 Link to this post

    Hi Chetan,

    Do you want to achieve something similar to this functionality?
    http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

    Regards,
    Eyup
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. systems
    systems avatar
    71 posts
    Member since:
    Dec 2013

    Posted 09 Sep 2015 in reply to Eyup Link to this post

    Not really Eyup, I had looked at this Batch edit demo already.

    Our case is - Lets say I edit only first row, then In Save handler can I get only modified rows(First row in this case) instead of all current page rows. 

    So, selective dirty rows to be identified and proceed with only those rows to saving to database and ignore the rest untouched rows.

    Thanks,

    Chetan

  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 14 Sep 2015 Link to this post

    Hi Chetan,

    The functionality that you require is available only with Batch edit mode, where a dirty indicator will be placed within the edited cells and furthermore, the server-side OnBatchEditCommand event will be fired only for the rows that were modified. 

    For the other edit modes (like the InPlace edit mode), such functionality is not available, mainly because each operation should be performed per row (through the Update, Insert or Delete buttons).
     

    Regards,
    Konstantin Dikov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  5. systems
    systems avatar
    71 posts
    Member since:
    Dec 2013

    Posted 15 Sep 2015 in reply to Konstantin Dikov Link to this post

    Thank you Konstantin for sharing the details. 

    I have no choice to switch to Batch edit mode now. Will do so.

    Btw, In batch edit mode do we need to loop through all of the Rows to identify the dirty flag or i will be getting a collection of dirty rows only ​in BatchEdit command?

    Thanks,

    Chetan

  6. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 18 Sep 2015 Link to this post

    Hello Chetan,

    With Batch Editing, when you click on the Save Changes button, the Commands collection from the OnBatchEditCommand event arguments will contain only the rows that were edited, inserted or deleted.

    Detailed information about Batch Editing could be found in the following help article:
    Hope this helps.


    Regards,
    Konstantin Dikov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  7. systems
    systems avatar
    71 posts
    Member since:
    Dec 2013

    Posted 22 Sep 2015 in reply to Konstantin Dikov Link to this post

    Got it! Thanks much Konstantin.
Back to Top