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

3 posts, 1 answers
  1. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 06 Nov 2012 Link to this post

    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. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 08 Nov 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Boris
    Boris avatar
    275 posts
    Member since:
    Oct 2012

    Posted 08 Nov 2012 Link to this post

    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.
Back to Top