This is a migrated thread and some comments may be shown as answers.
How to apply jquery buttonset() to radio buttons inside template column?
1 Answer 18 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vaishali
Top achievements
Rank 1
Vaishali asked on 08 Aug 2012, 10:40 PM
Have Approve and Deny radio buttons in template column, when I apply buttonset(), it changes the look but looses functionality of mutually exclusiveness.
Need help.


columns.Template(r =>
                                 {
                                     %>
                                    <div class="approveRadios" style="font-size: .80em !important;padding: 0px 0px 0px 0px !important;">
                                        <%-- <%= Html.RadioButton(r.RequestDetailsId.ToString(), "true", false, new { @id = "yes_Approve", @group = "Approval", @class = "Radio" })%><label for="yes_Approve">"Approve"+"<%=r.RequestDetailsId.ToString() %>"</label>
                                        <%= Html.RadioButton(r.RequestDetailsId.ToString(), "false", false, new { @id = "no_Approve", @group = "Approval", @class = "Radio" })%><label for="no_Approve">"Deny"+"<%=r.RequestDetailsId.ToString() %>"</label>--%>
                                       
                                      <input name="<%=r.RequestDetailsId %>" type="radio" value="<%= r.RequestDetailsId %>" onclick="Approval(<%= r.RequestDetailsId %>, 'Approved');" class="Radio" id = "yes_Approve"  /><label for="yes_Approve" >Approve</label>
                                      <input name="<%=r.RequestDetailsId %>" type="radio" value="<%= r.RequestDetailsId %>" onclick="Approval(<%= r.RequestDetailsId %>, 'Denied');" class="Radio" id = "no_Approve"/><label for="no_Approve" >Deny</label>
                                        
                                       </div>
                                     <%
                                 }).Title("Approve");
 
 
 
 
 <script type="text/javascript">
 
 
         $(document).ready(function () {
 
             //visuals
             $(function () {
                 $("#approveRequest").button();
                 $(".approveRadios").buttonset();
 
 
             });
 
         });
    </script>

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 13 Aug 2012, 05:11 PM
Hello Vaishali,

You should generate unique IDs in order to avoid this behavior e.g.

id='<%="yes_Approve" + r.RequestDetailsId %>'

Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
Vaishali
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or