Virtual scrolling looses edits on Checkbox bound column

5 posts, 0 answers
  1. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 30 Apr 2015 Link to this post

    We are using an editable grid with InCell editing in Batch mode. 

    We have a bool column with a checkbox using a client template:

    columns.Template(c => c.Active)
                    .ClientTemplate("<input type=\"checkbox\" name=\"chkActive\" id=\"chkActive\" value=\"#= Active #\" #= Active?'checked':'' # />")
                    .Title("Select")
                    .HeaderHtmlAttributes(new { style = "text-align:center" })
                    .Width(40).HtmlAttributes(new { style = "text-align:center" });

     

    It seems that we aren't getting two way biding though. We check some check boxes, then scroll down so a read occurs to get the next page of records, but when we scroll up the check boxes are no longer checked.

    Is this not the correct way to bind a checkbox to a bool column in the editable grid?

  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 04 May 2015 Link to this post

    Hello Bob,

    This is expected, as when you scroll with virtual scrolling the grid is redrawn and all unsaved changes are lost. In general the Kendo UI Grid does not support editing when virtual scrolling is enabled, so I would suggest you to reconsider this part of your application.

    Regards,
    Kiril Nikolov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 04 May 2015 in reply to Kiril Nikolov Link to this post

    Ok, can you explain why this is? Your controls use MVVM so aren't the changes made to the dataSource? It looks to me that as it pages it only gets that new page of data so the previously fetched rows in the data source should remain, right?

    Seems like something you could support. 

     

  5. Bob
    Bob avatar
    138 posts
    Member since:
    Sep 2012

    Posted 04 May 2015 in reply to Kiril Nikolov Link to this post

    Also, if somethings not supported, shouldn't the wrapper throw an exception when you configure it in a non-supported manner? Is this documented?
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 07 May 2015 Link to this post

    Hello Bob,

    The controls use MVVM, but if the changes are not saved, when the data is read from the server the changes are lost. Note that we do not have examples, showing virtual scrolling and editing, which we believe is clear that the feature is not supported. We will take another look and putting more explicit documentation stating the same.

    Thanks for the understanding.

    Regards,
    Kiril Nikolov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready