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

Is there a simpler way than this to bind RadButtons in checkbox mode?

2 Answers 140 Views
Button
This is a migrated thread and some comments may be shown as answers.
Boris
Top achievements
Rank 1
Boris asked on 06 Nov 2012, 07:09 PM
I have a RadButton in a Popup template in ToggleButton (checkbox) mode.  I've bound the checked property with the usual Bind statement to a bit field in my SQL db.

Actually everything has been working fine since I found this forum entry from 2009:  http://www.telerik.com/community/forums/aspnet-ajax/grid/checkbox-in-editform.aspx

I was just wondering if this is still the standard way of binding boolean fields for Insert?

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 08 Nov 2012, 09:28 AM
Hi Boris,

As far as I know the simplest way to bind the RadButton is as follows.

ASPX:
<telerik:RadButton ID="RadButton1" runat="server" ToggleType="CheckBox" ButtonType="ToggleButton" Checked='<%# Bind("Value") %>'>
</telerik:RadButton>

Hope this helps.

Regards,
Princy.
0
Boris
Top achievements
Rank 1
answered on 08 Nov 2012, 01:30 PM
That is what I did. 

But you still have to add a ListDictionary entry for each bound checkbox to the OwnerTableView in ItemCommand to prevent a crash if it's an insert. 

No matter.  I suppose it's not that much code.
Tags
Button
Asked by
Boris
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Boris
Top achievements
Rank 1
Share this question
or