Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Putting focus on recently added record to custom grid
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Aug 07 10:02 AM
I have a datagrid I am launching the 'add' form from the 'onpoupupmenu' event of the grid. I would like to put the focus on the newly added record when the add form closes. Currently the focus remains on whatever field was right clicked on when adding the record. I know I have done this before, but cannot for the life of me find the code..

How do I accomplish this? Thanks
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Aug 07 9:28 PM
Have you tried selecting it:

Datagrid.Selection.Add "ID of Record"

Keep in mind that for this to work you MUST add the ID column to the Layout (and then make it invisible). Otherwise it will silently fail to select the row.

I just finished writing this into a 6.2.3 environment, and use the code above...
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Aug 07 8:06 AM
Thanks Raul. It is not working for me for some reason... I am getting the ID of the recently added record fine and have the ID column in the grid.. I kinow I have used this command before also.. very strange.
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Aug 07 8:06 AM
Thanks Raul. It is not working for me for some reason... I am getting the ID of the recently added record fine and have the ID column in the grid.. I kinow I have used this command before also.. very strange.
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Aug 07 8:24 AM
Got it - Had to refresh the grid before running the .selection.add command
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Aug 07 9:15 AM
I didn't mention that thinking it was already being made, I always refresh my grids after making changes to them.
[Reply][Quote]
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Re: Putting focus on recently added record to custom gridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Aug 07 9:18 AM
I do to.. the oddity was that I had to refresh before I fired the command.. Thanks for the help Raul - much appreciated.
[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): 6/20/2025 10:45:57 AM