Filter Date Column as String

2 posts, 0 answers
  1. Laurie
    Laurie avatar
    144 posts
    Member since:
    Feb 2007

    Posted 15 Sep 2010 Link to this post

    I'm trying to use autopostbackonfilter to enable the users to enter a date or date fragment and have the filter return all records that contain that date fragment.  This is my code:



    <telerik:GridBoundColumn DataField="InvitedOn" HeaderText="First Invited On" UniqueName="InvitedOn" AutoPostBackOnFilter="true">

    It works just fine when the user enters the date or date fragment, but if the user enters text that is not in date format, e.g. "ddd" or "9/15/20100," it returns all records.  I would expect it to return no records in these cases.  How can I get the expected behavior?




  2. Pavlina
    Pavlina avatar
    6162 posts

    Posted 21 Sep 2010 Link to this post

    Hello Laurie,

    To achieve your goal, please consider using built-in GridDateTimeColumn as shown in this online demo.
    Dive this suggestion a try and let me know how it goes.

    All the best,
    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
Back to Top