Hi All,
You can use the following method to add menu items dynamically to the PopUpMenu of the DataGrid control of the SalesLogix6.2 LAN Client.
Sub PupulateMenu()
dim objMnu,i
dim arrMenuItems
arrMenuItems = Array(“Menu Item1″,”Menu Item2″,”Menu Item3″,”Menu Item4”)
set objMnu = <DataGrid Control Name>.PopupMenu
For i=0 to Ubound(arrMenuItems)
objMnu.Add
objMnu.Items(i+1).Caption = arrMenuItems(i)
Next
End Sub
Sub <DataGrid Control Name>MenuClick(Sender,Item)
Select case <DataGrid Control Name>.PopupMenu.MenuIndex
case 1
msgbox “Menu Item1 Selected”
case 2
msgbox “Menu Item2 Selected”
case 3
msgbox “Menu Item3 Selected”
case 4
msgbox “Menu Item4 Selected”
case else
msgbox “Invalid Menu Option”
End Select
End Sub
Happy Coding!! 🙂