I can add context menu when right click on the grid, but based on selected value from context menu, i want to hide / show the rows.
Ex: Grid have 4 column's, One of the column name is "Status", in that we get "Export" , "Done" and "Pending" for each rows, so i show there 3 values in context menu when right click on the grid using following code
'Declaration Private contextMenu1 As RadContextMenu 'Page Load contextMenu1 = New RadContextMenu() Dim menuItem1 As New RadMenuItem("Export") menuItem1.ForeColor = Color.Red AddHandler menuItem1.Click, AddressOf rmi1_Click Dim menuItem2 As New RadMenuItem("Verification") AddHandler menuItem2.Click, AddressOf rmi2_Click contextMenu1.Items.Add(menuItem1) contextMenu1.Items.Add(menuItem2) 'Code for show context menu Private Sub RadGridView1_ContextMenuOpening(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.ContextMenuOpeningEventArgs) Handles RadGridView1.ContextMenuOpening e.ContextMenu = contextMenu1.DropDown End Sub 'Menu click event Private Sub rmi2_Click(sender As Object, e As EventArgs) sender.Visible = CDec(sender.Row.Cells("Status").Value) = "Export" End Sub Private Sub rmi1_Click(sender As Object, e As EventArgs) sender.Visible = CDec(sender.Row.Cells("Status").Value) = "Done" End Sub
Private Sub rmi1_Click(sender As Object, e As EventArgs) sender.Visible = CDec(sender.Row.Cells("Status").Value) = "Pending" End Sub
Thanks and Regards
Aravind