
IT Department
Top achievements
Rank 1
IT Department
asked on 23 Jun 2010, 09:29 PM
Is there a way to limit or hide the default filter predicates that are displayed? I have no use for Is Null, Is Not Null, or the custom option.
3 Answers, 1 is accepted
0
Hello Grant Fish,
Jack
the Telerik team
Please find the answer to this question in your support ticket concerning the same topic (Ticket ID 321931). If you have any other questions, we will be glad to help.
Best wishes,Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0

Anisha
Top achievements
Rank 1
answered on 31 Aug 2010, 02:10 PM
Is it possible to post this answer in the forum? I would also like to know how to limit filter predicates.
Thanks
Anisha
Thanks
Anisha
0
Hi Anisha,
Yes, here is the answer:
You can customize the available filter actions by handling the ContextMenuOpening event. When handling this event, you have full control over the context menu and can hide or disable any item. Consider the sample below:
You have a point, we have to implement a more convenient API that allows for customizing the available filter predicates. We will also update our documentation. Please share your opinion on how such an API should look like and should behave. We will consider your feedback when planning our future releases.
Sincerely yours,
Jack
the Telerik team
Yes, here is the answer:
You can customize the available filter actions by handling the ContextMenuOpening event. When handling this event, you have full control over the context menu and can hide or disable any item. Consider the sample below:
void
radGridView1_ContextMenuOpening(
object
sender, ContextMenuOpeningEventArgs e)
{
if
(e.ContextMenuProvider ==
null
)
{
string
isNullName = RadGridLocalizationProvider.CurrentProvider.GetLocalizedString(RadGridStringId.FilterFunctionIsNull);
RadMenuItem item = FindMenuItem(e.ContextMenu, isNullName);
if
(item !=
null
)
{
item.Enabled =
false
;
}
}
}
private
RadMenuItem FindMenuItem(RadDropDownMenu menu,
string
itemName)
{
foreach
(RadMenuItem item
in
menu.Items)
{
if
(item.Text == itemName)
{
return
item;
}
}
return
null
;
}
You have a point, we have to implement a more convenient API that allows for customizing the available filter predicates. We will also update our documentation. Please share your opinion on how such an API should look like and should behave. We will consider your feedback when planning our future releases.
Sincerely yours,
Jack
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items