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

GridTemplateColumn with RadDatePicker does not show filter correctly(no calendar)

3 Answers 244 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 12 Sep 2013, 02:45 PM
Hi gentlemans,

Here is my aspx code:
<telerik:GridTemplateColumn DataField="DA_RESLN" HeaderText="Date de résolution" UniqueName="DA_RESLN" SortExpression="DA_RESLN"
ShowFilterIcon="True" HeaderStyle-Width="120px" FilterControlWidth="100px"
AutoPostBackOnFilter="True" FilterDelay="2000">
    <ItemTemplate>
        <asp:Label ID="LabelDateResolution" Text='<%#Eval("DA_RESLN", "{0:yyyy-MM-dd}")%>' runat="server"></asp:Label>
    </ItemTemplate>
    <EditItemTemplate>
        <telerik:RadDatePicker runat="server" ID="DatePickerDateResolution" SelectedDate='<%#Eval("DA_RESLN")%>' Calendar-Visible="True" ></telerik:RadDatePicker>
        <asp:CustomValidator ID="DatePickerDateResolution_Validator" runat="server" ErrorMessage="*Obligatoire" Display="Dynamic" ValidateEmptyText="True" ControlToValidate="DatePickerDateResolution" OnServerValidate="dtePickerDaReslnValidator_ServerValidate"></asp:CustomValidator>
    </EditItemTemplate>
</telerik:GridTemplateColumn>

I must be missing something here because the filter is rendered correctly and works perfectly except that it dosent show the calendar at right of the inputbox just like a GridDateTimeColumn does. Anyone ??

Thanks in advance,

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Sep 2013, 04:45 AM
Hi Nicolas,

Please note that the GridTemplateColumn does not generate a specific input control for filtering depending on the DataField type. Instead, you need to use FilterTemplate to achieve the requested functionality. Please refer to the ShippedDate column in the following example for an actual implementation:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx.

Thanks,
Princy

0
LABS, Inc.
Top achievements
Rank 1
answered on 04 Jun 2014, 09:30 PM
Hi,

We were having this same issue at our company, and I came across this post in search of an answer.  I wanted to respond by noting that when converting a GridBoundColumn to a GridTemplateColumn, the designer automatically converts the filter to an EditItemTemplate, rather than the FilterTemplate (which does in fact work with the Rad Date Picker). 

I just wanted to respond so that in a future release, you guys can possibly update the designer to take this into account.

Thanks,

Patrick
0
Eyup
Telerik team
answered on 09 Jun 2014, 08:15 AM
Hello Patrick,

Thank you for your feedback. Generally, RadGrid provides a GridDateColumn which addresses this requirement:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/basic-filtering/defaultcs.aspx

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
LABS, Inc.
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or