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

[Solved] GridDateTimeColumn - no time when filtering

2 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rudolf Kajan
Top achievements
Rank 1
Rudolf Kajan asked on 06 Aug 2009, 07:11 AM
Hi,

I am using grid and one of columns has date and time in it - for example 18.12.2009 13:00. Problem is, that after I click sort icon the time part is automat. cut off and filters are working with 18.12.2009 instead. 

But if I set PickerType="DateTimePicker" everything works, but 2 icons appear and I really need to hide those 2 icons (calendar + clock). Is it possible ? Thank you.

2 Answers, 1 is accepted

Sort by
0
Rudolf Kajan
Top achievements
Rank 1
answered on 10 Aug 2009, 07:41 AM
Anyone ?!
0
Pavel
Telerik team
answered on 11 Aug 2009, 07:18 AM
Hello Rudolf,

You can hide the date and time buttons of the picker with the following code executed in the ItemCreated server-side event handler of the Grid:

protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)  
{  
    if (e.Item is GridFilteringItem)  
    {  
        GridFilteringItem filteringItem = e.Item as GridFilteringItem;  
        RadDateTimePicker picker = filteringItem["ColumnUniqueName"].Controls[0] as RadDateTimePicker;  
        picker.DatePopupButton.Visible = false;  
        picker.TimePopupButton.Visible = false;  
    }  
}  

Regards,
Pavel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Rudolf Kajan
Top achievements
Rank 1
Answers by
Rudolf Kajan
Top achievements
Rank 1
Pavel
Telerik team
Share this question
or