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

Client side checkbox disable which is in the radgrid

4 Answers 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nagendra
Top achievements
Rank 1
Nagendra asked on 24 May 2011, 02:37 PM
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.

4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 24 May 2011, 07:41 PM
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
0
Nagendra
Top achievements
Rank 1
answered on 25 May 2011, 08:21 AM
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.
0
Jayesh Goyani
Top achievements
Rank 2
answered on 27 May 2011, 07:41 AM
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
0
Aung
Top achievements
Rank 1
answered on 23 Jun 2017, 03:33 AM

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

Tags
Grid
Asked by
Nagendra
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Nagendra
Top achievements
Rank 1
Aung
Top achievements
Rank 1
Share this question
or