Hello,
I need to change the text inside the ContextHeaderMenu in a radgrid.
I have the following code on my Page_Load:
AddHandler RadGridTransmission.HeaderContextMenu.ItemCreated, AddressOf Me.ContextHeaderMenu_ItemCreated
And the following code to change text in the context menu:
Protected Sub ContextHeaderMenu_ItemCreated(ByVal sender As Object, _
ByVal e As RadMenuEventArgs)
If (e.Item.Value = "ColumnsContainer") Then
e.Item.Text = "Show/Hide columns"
ElseIf (e.Item.Level = 2) AndAlso (TryCast(e.Item.Parent, RadMenuItem).Value = "ColumnsContainer") Then
If (e.Item.Value.EndsWith("ReceiverID")) Then
e.Item.Text = "Source Receiver ID"
End If
End Sub
The part that changes the text to "Show/Hide columns" works but the one to change the text for items in "ColumnsContainer" doesn't.
It finds the item, sets the text but does not change when I run the code.
Any idea?
Thanks!