Row template with GridCheckboxColumn

2 posts, 0 answers
  1. Robert
    Robert avatar
    15 posts
    Member since:
    Jan 2015

    Posted 28 Nov 2019 Link to this post

    Hi,

    I'm trying to implementa a RowTemplate. My grid has a GridCheckboxColumn as a first column but I don't know what to put in the first <td> element.
    I have tried putting <input type="checkbox" /> but context variable has no knowledge of a checked row.

    Any help is appreciated.

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5937 posts

    Posted 29 Nov 2019 Link to this post

    Hello Robert,

    When using a RowTemplate, everything in the row must be implemented by the developer. This would include not only selection, but also things like detail templates, buttons and the like.

    So, you would need to add a field in the model that denotes selection and bind the checkbox to it. If you want clicking the row to also invoke this, add an @onclick handler to the elements yourself that toggles this field as well.

     

    Regards,
    Marin Bratanov
    Progress Telerik

     UI for Blazor
Back to Top