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

[Solved] Non-Customized DatePicker in Filter

1 Answer 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 18 Apr 2013, 10:56 PM
I created a grid while debugging.

<

 

telerik:RadGrid ID="RadSearch" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="true" OnNeedDataSource="RadSearch_NeedDataSource">

I see that the autogenerated date fields returned have a date picker in the filter.

How do I get that in my grid where AutoGenerateColumns="false" and my date column is in the .aspx page?
<telerik:RadGrid ID="RadSearch" runat="server" AllowFilteringByColumn="True" AutoGenerateColumns="false" OnNeedDataSource="RadSearch_NeedDataSource">

 

 

...

...
<
Columns>

 

 

 

 

 

<telerik:GridBoundColumn DataField="Last_Update_Date" HeaderText="Modified" SortExpression="Last_Update_Date" AllowFiltering="true" UniqueName="Last_Update_Date" DataFormatString="{0:MM/dd/yyyy}" />
...

Thanks,
David

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 19 Apr 2013, 03:04 AM
Hi,

Please try using GridDateTimeColumn instead of GridBoundColumn. When columns are auto-generated, if any Data-Field is date, the RadGrid automatically bind the date in GridDateTimeColumn column. That is why you got DatePicker in filter.

ASPX:
<telerik:GridDateTimeColumn DataField="Last_Update_Date" HeaderText="Modified" SortExpression="Last_Update_Date" AllowFiltering="true" UniqueName="Last_Update_Date" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridDateTimeColumn>

Thanks,
Princy.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or