Combining batch edit and detail template edit on grid

4 posts, 1 answers
  1. Joe Wilson
    Joe Wilson avatar
    6 posts
    Member since:
    Dec 2009

    Posted 16 Nov 2020 Link to this post

    A client is asking for both batch edit AND a detail/expand edit.

    They like the Excel-like editing of batch, but they want several other UI features in the expanded/detail view that don't make sense in a grid row (think charts, hyperlinks, buttons to calculate things, etc.). The idea is that users could use both, even on the same row, then save all grid changes as usually for batch.

    I've got it mostly working here: https://jsfiddle.net/joewilson0/jwcLhtg2/

    But I have two questions:

    1. Is this a supported way to make edits? Any concerns?
    2. When I change a value in the detail/expand template, the row collapses. How can I prevent that?
  2. Answer
    Georgi Denchev
    Admin
    Georgi Denchev avatar
    110 posts

    Posted 18 Nov 2020 Link to this post

    Hi Joe,

    Thank you for the provided code snippet.

    Generally speaking editing the values of the master row through a detail row is possible. Examining the sample, everything seems to function properly. As for concerns, I can't think of any at this time. We have a Knowledge Base article dealing with a similar problem without binding the fields. 

    The reason the rows are collapsing after you edit them is because the model binder updates the UI in order to display the new values.

    The above article takes into consideration this issue, however if you insist on using mvvm there is an alternative method. You can prevent the collapse by Persisting the Expanded Rows. Here is one more example which uses localStorage to save the expanded rows.

    Let me know if you have any questions.

    Best Regards,
    Georgi Denchev
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. Joe Wilson
    Joe Wilson avatar
    6 posts
    Member since:
    Dec 2009

    Posted 13 Feb in reply to Georgi Denchev Link to this post

    Thank you for getting me pointed in the right direction.

    I wrote this up as a blog post because it's several steps: https://volaresystems.com/technical-posts/combining-batch-edit-and-detail-template-edit-on-a-kendo-ui-grid

    Here's the final working code: https://jsfiddle.net/joewilson0/e3p70jac/2/

  4. Georgi Denchev
    Admin
    Georgi Denchev avatar
    110 posts

    Posted 16 Feb Link to this post

    Hello Joe,

    Thank you very much for writing a detailed post explaining your solution and thank you for sharing it with us!

    I am certain it would prove helpful to other users who face a similar issue!

    Best Regards,
    Georgi Denchev
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Back to Top