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

[Solved] radio buttons in edit mode turn into checkboxes

1 Answer 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
cp
Top achievements
Rank 1
cp asked on 07 May 2012, 03:58 PM
Hi,
I have a radio button list inside my grid bound to boolean properties, however when in edit mode, the radio buttons turn into checkboxes.

I would imagine I can keep the radio button functionality by defining my own editor template, but I was wondering if there was a different way of achieving this?

columns.Bound(r => r.Property1).ClientTemplate("<input name='<#= ID #>' type='radio' disabled='disabled' checked='checked' /></text>");
columns.Bound(r => r.Property2).ClientTemplate("<input name='<#= ID #>' type='radio' disabled='disabled' <#=  Property2 ? checked='checked' : '' #> /></text>");


Thanks,

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 08 May 2012, 06:10 AM
Hello Claudiu,

Yes as you mentioned you should define editor template for these properties. The Grid is using the default editor templates and this means checkboxes for the boolean types.

Regards,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Grid
Asked by
cp
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or