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

Date Picker in RAD Grid

2 Answers 49 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manikandan
Top achievements
Rank 1
Manikandan asked on 30 Oct 2008, 07:12 AM
Hello,

I am using Rad grid ,update the RAD Grid  text box values in server side.I want to get the 'date picker value' and 'check box value' in server side code,how to get these values in update command.

Please advise

Thanks & Regards
Mani

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Oct 2008, 09:35 AM
Hello Manikandan,

I suppose you use GridDateTimeColumn and GridCheckBoxColumns. If so, try out the following code to access the RadDatePicker and CheckBox values.
aspx:
<telerik:GridCheckBoxColumn DataField="Check" UniqueName="check"
 </telerik:GridCheckBoxColumn>         
<telerik:GridDateTimeColumn DataField="date" UniqueName="date" >         
  </telerik:GridDateTimeColumn> 

cs:
protected void RadGrid2_UpdateCommand(object source, GridCommandEventArgs e) 
    { 
        GridEditableItem editItem = (GridEditableItem)e.Item; 
        RadDatePicker rdtpckr = (RadDatePicker)editItem["date"].Controls[0]; 
        CheckBox chkbx = (CheckBox)editItem["check"].Controls[0]; 
        string strtxt1 = rdtpckr.SelectedDate.ToString(); 
        string strtxt2 = chkbx.Checked.ToString(); 
    } 


Thanks
Princy.
0
Manikandan
Top achievements
Rank 1
answered on 30 Oct 2008, 09:52 AM
Hello Princy,

Thanks..its works fine..

Regards
Mani
Tags
Grid
Asked by
Manikandan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Manikandan
Top achievements
Rank 1
Share this question
or