Hello,
I have a GridDateTimeColumn in a radgrid that displays the date in yyyyMMdd format. In my SQL Server db the format is in yyyy-mm-dd.
This is my current aspx on that column:
<telerik:GridDateTimeColumn DataField="DateCode" DataType="System.DateTime" ItemStyle-HorizontalAlign="center" ItemStyle-Wrap="true" DataFormatString="{0:yyyyMMdd}" FilterControlWidth="70%" AllowSorting="true" AutoPostBackOnFilter="true" HeaderText="DateCode" SortExpression="DateCode" UniqueName="DateCode" FilterListOptions="AllowAllFilters" PickerType="None" AllowFiltering="true" FilterDateFormat="yyyyMMdd">
</telerik:GridDateTimeColumn>
This one is commented out, but I tried this as well:
<%-- <telerik:GridBoundColumn DataField="DateCode" DataType="System.Datetime" ItemStyle-HorizontalAlign="center" ItemStyle-Wrap="true" DataFormatString="{0:yyyyMMdd}" FilterControlWidth="70%" AllowSorting="true" AutoPostBackOnFilter="true" HeaderText="DateCode" SortExpression="DateCode" AllowFiltering="true" UniqueName="DateCode">
</telerik:GridBoundColumn>--%>
And when I try to filter the column, the filter control gets highlighted in red and a warning sign appear inside of it, but does not have any message. Do you know what is going on? Is it because the format is different from how it is in SQL db? If so, what else do I need to add/change/remove for it to work?
Attached is an image of what I get when I use the filter control.
I have a GridDateTimeColumn in a radgrid that displays the date in yyyyMMdd format. In my SQL Server db the format is in yyyy-mm-dd.
This is my current aspx on that column:
<telerik:GridDateTimeColumn DataField="DateCode" DataType="System.DateTime" ItemStyle-HorizontalAlign="center" ItemStyle-Wrap="true" DataFormatString="{0:yyyyMMdd}" FilterControlWidth="70%" AllowSorting="true" AutoPostBackOnFilter="true" HeaderText="DateCode" SortExpression="DateCode" UniqueName="DateCode" FilterListOptions="AllowAllFilters" PickerType="None" AllowFiltering="true" FilterDateFormat="yyyyMMdd">
</telerik:GridDateTimeColumn>
This one is commented out, but I tried this as well:
<%-- <telerik:GridBoundColumn DataField="DateCode" DataType="System.Datetime" ItemStyle-HorizontalAlign="center" ItemStyle-Wrap="true" DataFormatString="{0:yyyyMMdd}" FilterControlWidth="70%" AllowSorting="true" AutoPostBackOnFilter="true" HeaderText="DateCode" SortExpression="DateCode" AllowFiltering="true" UniqueName="DateCode">
</telerik:GridBoundColumn>--%>
And when I try to filter the column, the filter control gets highlighted in red and a warning sign appear inside of it, but does not have any message. Do you know what is going on? Is it because the format is different from how it is in SQL db? If so, what else do I need to add/change/remove for it to work?
Attached is an image of what I get when I use the filter control.