Hi,
I have a grid with some date time columns. It allows me to filter by choosing a date from a calendar or typing in the date manually.
I want to restrict this so that the user is only able to pick the date from the calendar and cannot type in anything in the text box. Below is the markup:
<telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date"
SortExpression="EndDate" UniqueName="EndDate" PickerType="DatePicker" DataFormatString="{0:dd MMM yyyy}"
AutoPostBackOnFilter="true">
<HeaderStyle Wrap="false" />
</telerik:GridDateTimeColumn>
In the item created event I have:
RadDatePicker rdpEndDate = filteringItem["EndDate"].Controls[0] as RadDatePicker;
rdpEndDate.DateInput.ReadOnly = true;
rdpEndDate.Width = Unit.Pixel(100);
Although this makes the textbox readonly, it totally disables the filter functionality i.e. I select a date and tab out of the text box but nothing happens.
I have a grid with some date time columns. It allows me to filter by choosing a date from a calendar or typing in the date manually.
I want to restrict this so that the user is only able to pick the date from the calendar and cannot type in anything in the text box. Below is the markup:
<telerik:GridDateTimeColumn DataField="EndDate" HeaderText="End Date"
SortExpression="EndDate" UniqueName="EndDate" PickerType="DatePicker" DataFormatString="{0:dd MMM yyyy}"
AutoPostBackOnFilter="true">
<HeaderStyle Wrap="false" />
</telerik:GridDateTimeColumn>
In the item created event I have:
RadDatePicker rdpEndDate = filteringItem["EndDate"].Controls[0] as RadDatePicker;
rdpEndDate.DateInput.ReadOnly = true;
rdpEndDate.Width = Unit.Pixel(100);
Although this makes the textbox readonly, it totally disables the filter functionality i.e. I select a date and tab out of the text box but nothing happens.