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

filter missing in datetime columns

1 Answer 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Minh
Top achievements
Rank 1
Minh asked on 14 Sep 2011, 06:59 PM
Hi,

I'm using the following codes to remove the some of the filter selections.  For some reason, it set the filters for all of the datetime columns to 'no filter'

 

 

GridFilterMenu menu = GridWellVent.FilterMenu;  

int i = 0; 

while (i < menu.Items.Count)

{

if (menu.Items[i].Text == "NoFilter" || menu.Items[i].Text == "Contains")

{

i++;

}

else

{

menu.Items.RemoveAt(i);

}

}

thanks,
Minh Bui

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 15 Sep 2011, 04:07 PM
Hello Minh,

Note that this behavior is expected, because GridDataTimeColumns does not support "Contains" filter function. And in your case only the "NoFilter" condition is satisfied, so this option remains. This constraint is applied to all columns which holds data different than string. On object types, like DateTime such filter function could not be applied, as the filter does not know the structure of the object nor how to parse them.

Regards,
Andrey
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Tags
Grid
Asked by
Minh
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or