GridDateTimeColumn "Equal To" filter problem

11 posts, 0 answers
  1. Thirunavukarasu Kannappan
    Thirunavukarasu Kannappan avatar
    2 posts
    Member since:
    Mar 2010

    Posted 19 Mar 2010 Link to this post


    Hi,

    I am facing problem in GridDateTimeColumn "Equal To " filter problem .I have one webpage having telerik:RadGrid .
    In this page grid I am having 

    "<telerik:GridDateTimeColumn DataField="DateRefundRequested"

    FilterListOptions="VaryByDataType" HeaderText="Date"

    UniqueName="DateRefundRequested" HeaderStyle-Width="175px"

    AllowFiltering="true"  /> 
    Column."

    I assigned to datasource to this telerik grid. In this datasource datetime type column value binded to corresponding "telerik:GridDateTimeColumn" in that telerik grid.

    When I run this page .the datasource value filled to gird. When I try to filter that grid is “EqualTo”.it was displayed is “No records found.”

    But When I apply the filter is “GreaterThan” ,it was return the results.

    So can you please suggest how to solve this issue.

    This is my code:

    <telerik:RadGrid runat="server" ID="ListGrid" ShowStatusBar="True"

                            AllowPaging="True" GridLines="None" Skin="Office2007"

                            PageSize="5" BorderStyle="Solid" AllowFilteringByColumn="True" AllowMultiRowSelection="True"  

                            PagerStyle-AlwaysVisible="true" ShowGroupPanel="True"                                                                

                            OnNeedDataSource="ListGrid_NeedDataSource"    

                            OnItemCommand="ListGrid_ItemCommand"

                            OnItemDataBound="ListGrid_ItemDataBound"   

                            OnItemEvent="ListGrid_ItemEvent"

                            OnPreRender="ListGrid_PreRender"                       

                            Width="100%"

                                                   

                            <ClientSettings AllowDragToGroup="false" AllowColumnsReorder="false" ReorderColumnsOnClient="False" >

                                <Scrolling AllowScroll="false" UseStaticHeaders="false" />                                                                          

                            </ClientSettings>        

                   

                            <GroupPanel ID="GridViewLeftGroupPanel" Text="Refund Requests">

                                <PanelStyle Width="100%" Height="20px" />

                            </GroupPanel>

                                                 

                            <PagerStyle Mode="NextPrevNumericAndAdvanced" />

                            <ItemStyle HorizontalAlign="Left" />

                                                                   

                            <mastertableview CommandItemDisplay="Top" AutoGenerateColumns="False" Width="100%"

                                CssClass="DetailTable_Default" DataKeyNames="PaymentRefundRequestID" NoMasterRecordsText="No records found." EditMode="InPlace" >

                                           

                                <PagerStyle Mode="NextPrevNumericAndAdvanced" />

                                           

                                <CommandItemTemplate>

                                    <div style="text-align: right; padding-top: 3px; padding-bottom: 3px; text-align: right; width: 100%;" >

                                        <asp:LinkButton runat="server" ID="selectAll" Text="Select All"

                                            CommandName="SelectAll" SkinID="GridSelectAllLinkButton"

                                            meta:resourcekey="selectAllResource1" />

                                        <asp:LinkButton runat="server" ID="unselectAll" Text="Deselect All"

                                            CommandName="UnSelectAll" SkinID="GridUnSelectAllLinkButton" Visible="False"

                                            meta:resourcekey="unselectAllResource1" />

                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                        <asp:LinkButton runat="server" ID="denyRefunds" Text="Deny Refund"

                                            OnClientClick="return OpenDenyReasonWindow();"

                                            SkinID="GridDenyRefundLinkButton" meta:resourcekey="denyRefundsResource1" />

                                        <asp:LinkButton runat="server" ID="processRefunds" Text="Process Refund"

                                            CommandName="ProcessRefunds" SkinID="GridProcessRefundLinkButton"

                                            meta:resourcekey="processRefundsResource1" />

                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                                        <asp:LinkButton ID="refreshPaymentsButton" runat="server" CommandName="Rebind"

                                            Text="Refresh" ToolTip="Refresh" SkinID="GridRefreshLinkButton"

                                            meta:resourcekey="refreshPaymentsButtonResource1" />

                                    </div>

                                </CommandItemTemplate>

                               

     

                                <Columns>

                                    <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"

                                        HeaderText="Select" AllowFiltering="false"

                                        meta:resourcekey="GridTemplateColumnResource1">                                  

                                        <ItemTemplate>

                                            <asp:CheckBox id="chbxSelect" OnCheckedChanged="ToggleRowSelection"

                                                AutoPostBack="True" runat="server" meta:resourcekey="chbxSelectResource1"></asp:CheckBox>

                                        </ItemTemplate>

                                    </telerik:GridTemplateColumn>

                                    <telerik:GridBoundColumn DataField="IsParentPayment" HeaderText="&nbsp;"

                                        HeaderStyle-Width="20px" UniqueName="ParentPayment" AllowFiltering="false"

                                        ReadOnly="true">

                                        <HeaderStyle Width="20px"></HeaderStyle>

                                    </telerik:GridBoundColumn>                                                                                              

                                    <telerik:GridDateTimeColumn DataField="DateRefundRequested" HeaderText="Date"

                                        UniqueName="DateRefundRequested" HeaderStyle-Width="175px"

                                        AllowFiltering="true" FilterListOptions="VaryByDataType"

                                        meta:resourcekey="GridBoundColumnResource3" />           

                                    <telerik:GridBoundColumn DataField="EntPayID" HeaderText=""

                                        DataType="System.Int32" UniqueName="EntPayID" AllowFiltering="False"

                                        Visible="false" meta:resourcekey="GridBoundColumnResource4" />

                                    <telerik:GridBoundColumn DataField="RefundReason" DataType="System.String"

                                        HeaderText="Reason" UniqueName="RefundReason" AllowFiltering="true"

                                        FilterListOptions="VaryByDataType"

                                        meta:resourcekey="GridBoundColumnResource11" />                                                               

                                </Columns>     

                               

                            </mastertableview>

                        </telerik:RadGrid>

     

    In this code "DateRefundRequested" GridDateTimeColumn column only i am trying to filter.but it is not working.

    ~ Thirunavukarasu

  2. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 24 Mar 2010 Link to this post

    Hi Thirunavukarasu,

    I have prepared a sample project for you demonstrating how to implement filtering for a GridDateTimeColumn.
    It is working fine on my side and the NoRecordsTemplate is displayed only when there is no date in the records matching the value of the selected one.
    Please take a look at the attachment and let me know whether it helps.

    Kind regards,
    Mira
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Thirunavukarasu Kannappan
    Thirunavukarasu Kannappan avatar
    2 posts
    Member since:
    Mar 2010

    Posted 29 Mar 2010 Link to this post

    Hi Mira,

    Thanks for your reply. I used your same attachment code. But it is not working. I attached screen shots.

     

    Regards

    Thirunavukarasu K

  5. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 01 Apr 2010 Link to this post

    Hello Thirunavukarasu,

    As you can see from the sample project attached in my previous message, I am unable to replicate the described issue.

    If the problem persists, please open a formal support ticket and attach a sample runnable project demonstrating it. We will debug it locally and get back to you with our findings.

    All the best,
    Mira
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Huib
    Huib avatar
    1 posts
    Member since:
    Jul 2010

    Posted 26 Jul 2010 Link to this post

    I ran into the same problem, I found out that EqualTo only works if you have a DateTime without the timespan (time set to zero), If a time is set to the OrderDate for example, its always bigger than the time selected in the filter
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 29 Jul 2010 Link to this post

    Hello Huib,

    In order to achieve your goal, you can handle the grid FilteringCommand as in the below articles and override the grid filter expression:

    http://www.telerik.com/help/aspnet-ajax/grdoperatewithfilterexpression.html
    http://www.telerik.com/help/aspnet-ajax/grdfilteringfordatetimecolumnwithdataformatstring.html

    Another option is to define your own FilterTemplate. You can check out this online demo for more information.

    Regards,
    Iana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 06 Sep 2011 Link to this post

    hi;
    I am also runniing with the same issue .My filtering is not working incase of DateBound Column.I have tried to run the sample Project as well but that to was not working .
    Please find more details in the following link
    http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/radgrid-filter-not-working-for-griddatetimecolumn-for-equal-to-options.aspx
  9. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 08 Sep 2011 Link to this post

    Hi;
    Can We have Any Resolution for above issue.We have tried all the thing but nothing seems to be Working for us.
    We are having Go-Live very soon please provide some reosultion
  10. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 08 Sep 2011 Link to this post

    Hello Manishkumar,

    What do you mean by "I have tried to run the sample Project as well but that to was not working ." ?
    If you provide us a detailed explanation of the issue and steps to replicate it, we will do our best to resolve it.

    Opening a formal support ticket and sending us a runnable project will be highly appreciated.

    Kind regards,
    Mira
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  11. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 08 Sep 2011 Link to this post

    hi Mira
    the sample Project attach in this forum thread. I have tried that project but still it was not working.
    Can u please show me some work around to achive this.
    please tell how can i upload sample project in this forum thread
  12. Mira
    Admin
    Mira avatar
    1124 posts

    Posted 13 Sep 2011 Link to this post

    Hello Manishkumar,

    Please open a formal support ticket through your account and attach the project to it.
    We will debug it locally and get back to you with our findings.

    Thank you in advance for the cooperation.

    Greetings,
    Mira
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017