ControlParameter using RadDatePicker breaks grid

2 posts, 0 answers
  1. Chris
    Chris avatar
    13 posts
    Member since:
    Dec 2011

    Posted 26 Oct 2017 Link to this post


    I'm attempting to use a RadDatePicker to feed into a query using a ControlParameter linked to it.  The very action of adding it in causes the grid to not render even if I don't use the parameter in the query itself.  If i add a default value to the RadDatePicker it seems to work fine so something is going on when it is trying to pass the default value (i assume null) and map it to the parameter.

    Example code:

    <telerik:RadDatePicker ID="Record_Date" MinDate="1900-01-01" runat="server" CssClass="birtForm" AutoPostBack="True" Width="200px" DataTextField="Record_Date" DataValueField="Record_Date">


    <asp:ControlParameter Name="Record_Date" PropertyName="SelectedDate" ControlID="Record_Date"></asp:ControlParameter>


    Is there a solution to this?


  2. Eyup
    Eyup avatar
    3894 posts

    Posted 01 Nov 2017 Link to this post

    Hi Chris,

    Do you use this SelectedDate ControlParameter in the WHERE clause of the Select command? In this case, it is expected that the DefaultValue should be present. Otherwise, it is just like passing a null and there may be no records returned from the database.

    If you aim to implement initial filtering, you can achieve this using the approach demonstrated in the following post:

    And here is a sample for the Between function:

    I hope this will prove helpful.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top