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

telerik grid data colomn filtering with different date time formats

2 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahe
Top achievements
Rank 1
Mahe asked on 04 Oct 2011, 01:50 PM
i have a data grid with a template column for date.
data field having both date and time as the data source. while displaying it formatted only to display date.
the data and time format differs with the language format.

 <telerik:GridTemplateColumn DataField="RegDate" FilterControlWidth="30"  HeaderStyle-Width="30" SortExpression="RegDate" AllowFiltering="true" ItemStyle-HorizontalAlign="Left" UniqueName="lblRegDate">
                 <ItemTemplate >
                  <div class="column-80" style="text-align:left;width:56px;float:left"><%#string.Format("{0:d}", Convert.ToDateTime(Eval("RegDate"))) %></div>
                 </ItemTemplate>
                </telerik:GridTemplateColumn>

when filters applied its not filtering by formatted date.

2 Answers, 1 is accepted

Sort by
0
Johny
Top achievements
Rank 1
answered on 07 Oct 2011, 07:33 AM
Hi

I believe that the forum bellow explains why your code does not work:

http://www.telerik.com/community/forums/aspnet-ajax/grid/date-time-col-doesnt-find-date-in-timestamp.aspx

Thanks,
Johny
0
Jayesh Goyani
Top achievements
Rank 2
answered on 07 Oct 2011, 09:49 AM
Hello,

Please try with this link.

Thanks,
Jayesh Goyani
Tags
Grid
Asked by
Mahe
Top achievements
Rank 1
Answers by
Johny
Top achievements
Rank 1
Jayesh Goyani
Top achievements
Rank 2
Share this question
or