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

Change control data with other controls text changed in grid

2 Answers 55 Views
Grid
This is a migrated thread and some comments may be shown as answers.
zeynep
Top achievements
Rank 1
zeynep asked on 10 Dec 2012, 03:39 PM
Hi ,
i am tring to do this:
İ have a radgrid with templatecolumns.
in edit mode (in different columns) i have  datepickers . i want to change datepicker2 value when i changed datepicker1 value.i mean when selecteddatechanged . it is not important client side or server side. 
Could you pls help?

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Dec 2012, 04:19 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void RadDatePicker1_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
{
        RadDatePicker pkr = (RadDatePicker)sender;
        GridEditableItem item = (GridEditableItem)pkr.NamingContainer;
        RadDatePicker pkr2 = (RadDatePicker)item.FindControl("RadDatePicker2");
        pkr2.SelectedDate = DateTime.Now;
}

Thanks,
Princy.
0
zeynep
Top achievements
Rank 1
answered on 11 Dec 2012, 07:34 AM
This is exactly what im looking for. Thank you very much.
Tags
Grid
Asked by
zeynep
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
zeynep
Top achievements
Rank 1
Share this question
or