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

[Solved] Date filtering issue

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
yeswanth pavan
Top achievements
Rank 1
yeswanth pavan asked on 23 Jan 2010, 01:04 PM

 

Hi all,

 

1)the Between option for Filtering is Showing Wrong data for dates when we use Telerik grid bound column i also used Datatype as system.datatime for that column if we use Telerik Datetime  column as shown in examples

it is not showing Between option.I want Between option

ex:If iam giving dates as 02/24/1984 03/20/1986 in the Filter textbox and using BETWEEN for those two dates it is showing wrong data.Iam attaching the screen shot.
..................................Code for Filtering...........................................






 
 
Hi all,  
 
 
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">   
 
 <asp:UpdatePanel ID="UpdatePanel1" runat="server">   
 
<ContentTemplate>   
 
 <telerik:RadGrid ID="gviewResource" runat="server" AutoGenerateColumns="False" OnRowEditing="gviewResource_RowEditing"   
 
 
OnRowDeleting="gviewResource_RowDeleting" AllowPaging="True" AllowSorting="True"   
 
OnDataBound="gviewResource_DataBound" CellPadding="0"   
 
GridLines="None" Width="100%" OnPageIndexChanging="gviewResource_PageIndexChanging"   
 
 
OnRowCreated="gviewResource_RowCreated" OnSorting="gviewResource_Sorting"   
 
BorderColor="#66CCFF" BorderStyle="Solid" BorderWidth="1px"   
 
onrowdatabound="gviewResource_RowDataBound"   
 
onitemcommand="gviewResource_ItemCommand" Skin="Vista"   
 
AllowFilteringByColumn="True" onitemcreated="gviewResource_ItemCreated"   
 
 
EnableLinqExpressions="False"   
 
onitemdatabound="gviewResource_ItemDataBound">   
<MasterTableView>   
<Columns>   
<telerik:GridBoundColumn DataField="ResourceID" HeaderText="ID" >   
<HeaderStyle CssClass="textCenter" Width="6%" Wrap="True" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" HeaderStyle-Width="75px">   
 
 
<HeaderStyle Width="75px" />   
 
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Designation" HeaderText="Designation" SortExpression="Designation" HeaderStyle-Width="75px">   
 
   
<HeaderStyle Width="75px" />   
 
   
</telerik:GridBoundColumn>   
 
 <telerik:GridBoundColumn DataField="Date Of Joining" HeaderText="Date Of Joining" SortExpression="Date Of Joining" HeaderStyle-Width="75px">   
 
   
<HeaderStyle Width="75px" />   
 
 </telerik:GridBoundColumn>   
 
 <telerik:GridBoundColumn DataField="Date Of Birth" HeaderText="Date Of Birth" SortExpression="Date Of Birth" HeaderStyle-Width="75px">   
 
<HeaderStyle Width="75px" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Exp. In Yrs" HeaderText="Exp. In Years" SortExpression="Exp. In Yrs" HeaderStyle-Width="75px">   
 
<HeaderStyle Width="75px" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Exp. In Mon" HeaderText="Exp. In Mon" SortExpression="Exp. In Mon" HeaderStyle-Width="75px">   
 
<HeaderStyle Width="75px" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Email" HeaderText="Email ID" SortExpression="Email" HeaderStyle-Width="75px">   
 
<HeaderStyle Width="75px" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridBoundColumn DataField="Resource Status" HeaderText="Status" SortExpression="Resource Status" HeaderStyle-Width="75px">   
 
<HeaderStyle Width="75px" />   
 
</telerik:GridBoundColumn>   
 
<telerik:GridTemplateColumn HeaderText="Edit" AllowFiltering="false" >   
 
 <ItemTemplate>   
 
 <asp:ImageButton ID="Image" runat="server" ImageUrl="images/edit.gif" CommandName="Edit" ></asp:ImageButton>   
</ItemTemplate>   
</telerik:GridTemplateColumn>   
<telerik:GridTemplateColumn HeaderText="Reject/Delete" AllowFiltering="false">   
 
<ItemTemplate>   
 
<asp:ImageButton ID="imgbtnDeActivate" runat="server" ToolTip="Delete Resource" ImageUrl="~/images/delete-icon.gif"   
 
CommandName="Delete" OnClientClick="return confirm('Are you sure you want to reject/delete this resource?');" />   
 
</ItemTemplate>   
 
</telerik:GridTemplateColumn>   
 
</Columns>   
 
 </MasterTableView>   
 
<ClientSettings EnableRowHoverStyle="true">   
 
<Selecting AllowRowSelect="true" />   
 
<Scrolling EnableVirtualScrollPaging="True" UseStaticHeaders="False" />   
 
<Resizing AllowColumnResize="True" />   
 
   
</ClientSettings>   
 
<FooterStyle ForeColor="White" />   
 
<HeaderStyle CssClass="heading" Font-Bold="True" Font-Strikeout="False" Font-Underline="False"   
 
Height="30px" />   
 
</telerik:RadGrid>   
 
</ContentTemplate>   
 
 </asp:UpdatePanel>   
 
</telerik:RadAjaxPanel>   
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"   
 
Width="75px" Skin="Sunset">   
 
</telerik:RadAjaxLoadingPanel>   
 
   
 
 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 27 Jan 2010, 03:56 PM
Hello Yeswanth,

I noticed that my colleague Iana has already answered your question in another forum thread. To avoid duplicate posts please review her answer here.

Regards,
Martin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
yeswanth pavan
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or