Client side checkbox disable which is in the radgrid

5 posts, 0 answers
  1. Nagendra
    Nagendra avatar
    35 posts
    Member since:
    Jan 2011

    Posted 24 May 2011 Link to this post

    Hi All,

    I have radgrid in which i have checkbox, radnumerictextbox, raddatepicker etc...controls.
    I have to implement several rules in radgrid.

    Below attached is the screenshot of radgrid.
    1. When i check 'completed' checkbox 'percent complete' radnumerictextbox value should be 100, '99%Complete' checkbox should be uncheck and disable, 'Actual Start' and 'Actual Finish' raddatetimepickers filled with specific date.

    i need this senario in client side only.
    Please anybody help me to resolve this issue.

    Thanks,
    Nagendra.
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 24 May 2011 Link to this post

    Hi Nagendra

    please check below link and let me know if any concern.

    http://www.telerik.com/community/forums/aspnet-ajax/grid/calculate-and-change-time-difference-in-side-the-grid.aspx

    Thanks,
    Jayesh Goyani
  3. Nagendra
    Nagendra avatar
    35 posts
    Member since:
    Jan 2011

    Posted 25 May 2011 Link to this post

    Hi Jayesh,

    First i need help in disabling checkbox using javascript.
    When i am checking 'Completed' checkbox 'percent complete' radnumerictextbox value should be 100 and '99%complete' checkbox uncheck and disabled.

    I need this senario in client side only.
    Thanks in advance.

    Thanks,
    Nagendra.
  4. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 27 May 2011 Link to this post

    Hi,

    function ChkCompleted_Click(c1, c2, t1) {
     
                    
                   if (document.getElementById(c1).checked) {
                       document.getElementById(c2).checked = false;
                       document.getElementById(c2).disabled = true;
                       document.getElementById(t1).value = "100";
                        
                   }
                   else {
                       document.getElementById(c2).disabled = false;
                   }
               }
     
     
     
    <telerik:GridTemplateColumn UniqueName="Completed" HeaderText="ChkCompleted">
                                       <ItemTemplate>
                                           <asp:CheckBox ID="ChkCompleted" runat="server" />
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="HalfCompleted" HeaderText="ChkHalfCompleted-99%">
                                       <ItemTemplate>
                                           <asp:CheckBox ID="ChkHalfCompleted" runat="server" />
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>
                                   <telerik:GridTemplateColumn UniqueName="Percentage" HeaderText="txtPercentage">
                                       <ItemTemplate>
                                           <telerik:RadNumericTextBox ID="txtPercentage" runat="server">
                                           </telerik:RadNumericTextBox>
                                       </ItemTemplate>
                                   </telerik:GridTemplateColumn>

    if (e.Item is GridDataItem )
            {
                GridDataItem item = e.Item as GridDataItem;
                CheckBox ChkCompleted = (CheckBox)item.FindControl("ChkCompleted");
                CheckBox ChkHalfCompleted = (CheckBox)item.FindControl("ChkHalfCompleted");
                RadNumericTextBox txtPercentage = (RadNumericTextBox)item.FindControl("txtPercentage");
                txtPercentage.Text = "10";
     
                ChkCompleted.Attributes.Add("onclick", "ChkCompleted_Click('" + ChkCompleted.ClientID + "','" + ChkHalfCompleted.ClientID + "','" + txtPercentage.ClientID + "')");
            }

    Thanks,
    Jayesh Goyani
  5. Aung
    Aung avatar
    3 posts
    Member since:
    Jul 2014

    Posted 22 Jun 2017 Link to this post

    Hi all,

     

    I have a radgrid which binding radnumerictextbox and checkboxes. I saw that if a radgrid column is radnumerictextbox type, that column not accept another types. eg...checkbox type. So How do if I wanna put radnumerictextbox and checkbox in a one column, some row show radnumeric and some row show checkbox. Thanks all

Back to Top