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

Quit some items of filter menu

1 Answer 11 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Andrés David Santacoloma Isaza asked on 08 May 2011, 12:08 AM
Hi:
I need quit some items of the filter menu in mi GridView.
How Can i do it?

thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrés David Santacoloma Isaza
Top achievements
Rank 1
answered on 08 May 2011, 02:16 AM
Hi:
I found the solution, and also found how to change the text to the filter menu items

Private Sub GridViewGeneral_ContextMenuOpening(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.ContextMenuOpeningEventArgs) Handles GridViewGeneral.ContextMenuOpening

        For i As Integer = 0 To e.ContextMenu.Items.Count - 1
            If e.ContextMenu.Items(i).Text = "No filter" Then
                e.ContextMenu.Items(i).Text = "No Filtrar"
            ElseIf e.ContextMenu.Items(i).Text = "Contains" Then
                e.ContextMenu.Items(i).Visibility = ElementVisibility.Collapsed
            End If
        Next

End Sub
Tags
GridView
Asked by
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Answers by
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Share this question
or