3 Answers, 1 is accepted
0
Accepted

Elliott
Top achievements
Rank 2
answered on 28 Dec 2012, 08:37 PM
be more specific
also, some code might be nice
I think if you have a
what is it you want to do for a date - i.e. dates of a certain range change the back color on the row
"GridDateTimeColumn - with option to choose RadDatePicker, RadDateTimePicker, RadTimePicker or simply RadDateInput as editor. To choose the editor type use the PickerType property of the column"
also, some code might be nice
I think if you have a
GridDateTimeColumn then the filter is a RadCalendarwhat is it you want to do for a date - i.e. dates of a certain range change the back color on the row
"GridDateTimeColumn - with option to choose RadDatePicker, RadDateTimePicker, RadTimePicker or simply RadDateInput as editor. To choose the editor type use the PickerType property of the column"
0
Accepted

Shinu
Top achievements
Rank 2
answered on 02 Jan 2013, 06:22 AM
Hi,
Try the following code to compare dates.
C#:
Thanks,
Shinu.
Try the following code to compare dates.
C#:
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
RadDatePicker picker1 = (RadDatePicker)item.FindControl(
"RadDatePicker1"
);
RadDatePicker picker2 = (RadDatePicker)item.FindControl(
"RadDatePicker2"
);
CompareValidator compValidate = (CompareValidator)item.FindControl(
"CompareValidator1"
);
compValidate.ControlToValidate =picker1.ID;
compValidate.ControlToCompare = picker2.ID;
compValidate.ValueToCompare = DateTime.Now.ToShortDateString();
compValidate.Type = ValidationDataType.Date;
compValidate.Operator = ValidationCompareOperator.LessThanEqual;
compValidate.ErrorMessage =
"EndDate should not be less than StartDate"
;
}
}
Thanks,
Shinu.
0

Yadi
Top achievements
Rank 1
answered on 21 Jan 2013, 03:57 AM
thanks
it work for me
it work for me