RadControls for ASP.NET AJAX You can change the text of the items in the filter menu in the code-behind. This is useful if you want to localize the filter function names or change them to display your own custom text.
To change the text of the items in the filter menu, add code to the Page_Load event handler for your page:
Use the FilterMenu property of the grid to access the filtering menu. There is a single filtering menu server-side, which is cloned for each of the separate filter menus that appear client-side.
Use the Items property of the filtering menu to access the individual menu items. Each item in the filter menu server-side object is of type RadMenuItem.
Use the Text property of the grid menu items to set the new text for the menu item.
The following example illustrates this process:
CopyC#
protected void Page_Load(object sender, System.EventArgs e)
{
GridFilterMenu menu = RadGrid1.FilterMenu;
foreach (RadMenuItem item in menu.Items)
{
if (item.Text == "StartsWith")
{
item.Text = "your_custom_localized_string";
}
}
}
CopyVB.NET
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim Menu As GridFilterMenu = RadGrid1.FilterMenu
Dim item As RadMenuItem
For Each item In Menu.Items
If item.Text = "StartsWith" Then
item.Text = "your_custom_localized_string"
End If
Next
End Sub