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

Modify the skin of RadDatePickers within GridFilteringItem

1 Answer 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tomas
Top achievements
Rank 1
Tomas asked on 14 Nov 2012, 12:57 PM
The problem that I have is the following.
I have created a skin for RadDatePickers similar to this
<telerik:RadDatePicker runat="server" DateInput-DateFormat="dd/MM/yyyy" >
<Calendar>
    <FooterTemplate>
       <div style=" text-align: center">
         <a  href="#" onclick="SelectToday(this)" >Today</a>
        </div>
    </FooterTemplate>
</Calendar>
</telerik:RadDatePicker> 

Basically, it is just adding a footer with a link in it to the calendar used by the RadDatePicker. This skin works well in all of the pages of my application whenever I use a RadDatePicker. The problem is that the RadDatePickers used in the filtering section of RadGrids do not seem to apply this skin defintion. I have tried to apply it programatically in the RadGrid ItemCreated event with no luck.
Why is that? And what could I do to be able to apply my skin in the RadDatePickers within the filtering section of RadGrids?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 19 Nov 2012, 08:32 AM
Hello Tomas,

Creating templates dynamically is a more specific task which requires defining a custom class that implements the ITemplate interface. Therefore, I suggest you to implement your filter functionality using FilterTemplate for your desired columns:
<telerik:GridDateTimeColumn ...>
    <FilterTemplate>
        <telerik:RadDatePicker ...>
    </FilterTemplate>
</telerik:GridDateTimeColumn>

You could check out the following demo which demonstrates how to do that using client side method
( ShippedDate column ):
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

I hope this will prove helpful.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Tomas
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or