Adding PopUpMenu Items dynamically to the DataGrid’s PopUpMenu in SalesLogix6.2

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!! 🙂

Advertisements

One thought on “Adding PopUpMenu Items dynamically to the DataGrid’s PopUpMenu in SalesLogix6.2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s