Add to a Checkbox

109 views
Skip to first unread message

Tom Thorp

unread,
Jun 14, 2012, 12:43:37 PM6/14/12
to jui...@googlegroups.com
I'm looking for a suggestion on how to extend the juiceUi controls to support checkbox's or individual radio buttons?

Andrew Powell (appendTo)

unread,
Jun 14, 2012, 12:55:45 PM6/14/12
to jui...@googlegroups.com
What do you mean by 'support' ?

Tom Thorp

unread,
Jun 14, 2012, 12:57:06 PM6/14/12
to jui...@googlegroups.com

Poor wording.  I want to be able to use juiceUi to style checkboxes as buttons.

Andrew Powell (appendTo)

unread,
Jun 14, 2012, 12:59:32 PM6/14/12
to jui...@googlegroups.com
<input type="checkbox" id="check" /><label for="check">Toggle</label>
<juice:button TargetControlID="check" ID="_ButtonCheck" runat="server"/>

That should do it.

Tom Thorp

unread,
Jun 14, 2012, 1:33:52 PM6/14/12
to jui...@googlegroups.com
I like that.  However, I need to use the asp:checkbox control for consistency with the rest of the application.

Also, I would like to use an alternate button library for this.  http://dochoffiday.com/Professional/jquery-ui-checkbox-radiobutton-replacement.
This one has the advantage of having different icons for the "on" and "off" states.

Andrew Powell (appendTo)

unread,
Jun 14, 2012, 1:39:08 PM6/14/12
to jui...@googlegroups.com
You'd just change the TargetControlID to point to your asp:checkbox control...

If you want to add/remove/change icons on the buttons, you can do so through css/javascript.

If you'd like to hook up a third party jquery ui widget to juice ui, have a look at how the widgets are wired up in the Juice UI source code on github, or the Wijmo Open for Juice UI source code. Alternately, you can contract appendTo to do that for you as a consulting job.

Tom Thorp

unread,
Jun 14, 2012, 1:47:50 PM6/14/12
to jui...@googlegroups.com
With the following code -

       <asp:CheckBox ID="_cb1" Text="click me" runat="server"  /><br />
        <juice:button targetcontrolid="_cb1" runat="server" />


I get the following error:

Extender control '' cannot extend '_cb1'. Extender controls of type 'Juice.Button' cannot extend controls of type 'System.Web.UI.WebControls.CheckBox'.



When I looked at source for button, it doesn't include checkbox as an allowed target type. 
Reply all
Reply to author
Forward
0 new messages