This is a migrated thread and some comments may be shown as answers.

Row template with GridCheckboxColumn

1 Answer 360 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 28 Nov 2019, 09:36 PM

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.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 29 Nov 2019, 12:49 PM

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
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or