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

Date Column filter display

1 Answer 68 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 06 Nov 2013, 09:52 PM
I'm seeking advice about my filter item for a date column of my radgrid.

The default display positions the datepicker box on the left, the calendar icon in the center and the filter menu icon on the right.

I would like to display the filter menu icon on the left followed by the datepicker's textbox.  I'd like the calendar icon to not show at all and for the calendar pop-up to be triggered by a mouse-click in the datepicker's textbox (something I know I can achieve in a plain datepicker, but have not been able to control when it is part of an automatically-generated column filter)

Is there a straightforward way to achive this display preference?  I've made some columns with FilterTemplates before, but I've not been able to include the filter icon and menu with them.

Please advise.  Thanks


Mike

1 Answer, 1 is accepted

Sort by
0
Venelin
Telerik team
answered on 11 Nov 2013, 06:32 PM
Hello Mike,

Could you please take a look at the attached test page and see if this is your requirement? It basically consists in retrieving the picker's table and set the dir property to rtl and to normalize things back it sets the dir to ltr to the text box in the picker:

JavaScript:

function onGridCreated(sender, eventArgs){
    $telerik.$(".rcTable").attr("dir", "rtl");
    $telerik.$(".rcTable .riTextBox ").attr("dir", "ltr");
}

ASPX:

<ClientSettings>
    <ClientEvents OnGridCreated="onGridCreated" />
</ClientSettings>

You can use JavaScript to hide the desired icon too. Just retrieve the desired element and set .style.display = "none" to it.

Regards,
Venelin
Telerik
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 the blog feed now.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Venelin
Telerik team
Share this question
or