Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: DataGrid Popup Menu options
Sarah Peterson
Posts: 37
 
DataGrid Popup Menu optionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jun 06 2:51 PM

viagra diskuze

viagra
fiogf49gjkf0d
Is there a way to disable popup menu items via scripting? I have a datagrid with custom popup menus options that I have created. I also have a global variable being set in the AXFormChange sub-routine that determines if the user has Read-Only or update capabilities for this particular tab. I was wondering if there was a way for me to find out what the global variable is set to and then based on that value enable or disable the popup menu options.

I am having problems reading the value of the global variable as well. Any suggestions for what I would like to be able to do??
[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: DataGrid Popup Menu optionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jun 06 2:30 AM

naloxone naltrexone comparison

naloxone vs naltrexone read
fiogf49gjkf0d
To read the global variable I use something like this:
gVariable = Application.GlobalInfo.Item("globalvariablename")

If you want to disable popup menus entirely you can do something like this:

If gVariable = "ReadOnly" Then
DataGrid.PopupMenu.Enabled = False
Else
DataGrid.PopupMenu.Enabled = True
End If

I am not on my work computer so I can not pull up actual code examples - so these are from memory and I might be wrong in the exact syntax.

Ted
[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: DataGrid Popup Menu optionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jun 06 2:38 AM
fiogf49gjkf0d
Logged into my work computer and found this example for setting individual popup menu items:

If gVariable = "ReadOnly"
DataGrid.PopupMenu.Items(0).Enabled = False
Else
DataGrid.PopupMenu.Items(0).Enabled = True
End If

You can then enable or disable the individual items.

Also about global variables, you can use this line of code to see if the global info was defined:
If application.BasicFunctions.GlobalInfoExists("globalvariablename") Then
Your code here...
End If

Hope this helps.

Ted
[Reply][Quote]
muni1900
Posts: 21
 
Re: DataGrid Popup Menu optionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Dec 07 3:40 PM
Quote:
Originally posted by Ted Sturr


If you want to disable popup menus entirely you can do something like this:

If gVariable = "ReadOnly" Then
DataGrid.PopupMenu.Enabled = False
Else
DataGrid.PopupMenu.Enabled = True
End If

Ted


I am trying to disable popup menu entirely for users other than "Admin", So I did:

If Application.BasicFunctions.CurrentUseriD <> "ADMIN" Then
DataGrid.PopUpMenu.Enabled = False
Else
DataGrid.PopUpMenu.Enabled = True
End If

However, the menu is still displayed ! Any idea anyone?
Note: I have 5 items in the menu, add, edit, delete, copy, move
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: DataGrid Popup Menu optionsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Dec 07 10:50 AM
The second post by Ted actually clarified this, as a generic DataGrid.PopupMenu.Enabled does not work - it doesn't give you enough granular control over individual items in the popup menu.

One other thing that is important to verify is how your popup menu is put together. If the first three items, add edit and delete, are actually part of the EditOptions property rather than the popup menu property, then you'll need to use this:

DataGrid.EditOptions.ShowAdd = (Application.BasicFunctions.CurrentUseriD = "ADMIN")
DataGrid.EditOptions.ShowDelete = (Application.BasicFunctions.CurrentUseriD = "ADMIN")
DataGrid.EditOptions.ShowEdit = (Application.BasicFunctions.CurrentUseriD = "ADMIN")

For the popup menu, whether you have only the last two items (copy and move), or all five, you need to use this format:

DataGrid.PopupMenu.Items(0).Enabled = (Application.BasicFunctions.CurrentUseriD = "ADMIN")
DataGrid.PopupMenu.Items(1).Enabled = (Application.BasicFunctions.CurrentUseriD = "ADMIN")

You've been missing the Items(x) - where x is the index of the popupmenu item. This should help you with disabling the menus.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/18/2025 8:04:28 AM