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: Best way of adding "double-click to edit" functionality?
Mark Hanford
Posts: 131
 
Best way of adding "double-click to edit" functionality?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jan 08 10:20 AM
I have a form with a DataGrid of records pulled from a new top-level table, and accessed from a new menu, Manage->Interests.

It kind of works okay now, and I can right-click to Add/Edit/Delete, the first two of which open up a second form bound using the EditView properties.

My question is, how do I add double-click functionality? I've seen it in some other places, but it seems to require a lot of coding in order to spawn a new instance of the form and set the recordset, and after saving I have to create functions for UPDATE or INSERT INTO to handle that. Seems a bit excessive.

Hoping there's an easier way,

Mark
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Best way of adding "double-click to edit" functionality?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jan 08 10:42 AM
So you just want to invoke the edit action when the row is double-clicked? Is this right? Take a look at this article: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=48 You'll just trigger that from the double-click action of the grid.
[Reply][Quote]
Ted Sturr
Posts: 78
 
Re: Best way of adding "double-click to edit" functionality?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jan 08 4:44 PM
Not to knock what Ryan wrote but there is now a simpler way to accomplish this in one line of code - just invoke the ViewEdit object. Here is an example:

Sub grdGridNameDblClick(Sender)
grdGridName.ViewEdit
End Sub

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Best way of adding "double-click to edit" functionality?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Jan 08 4:47 PM
Hi Ted,

That way works too, but I can't recall what version it was added in (it was only added in a fairly recent version - I know for sure it doesn't exist in 6.2.6, haven't checked 7.0.1 or higher). Anyway, if your version doesn't have the ViewEdit method on the DataGrid you'll have to invoke the edit form using ShowViewForRecord.

-Ryan
[Reply][Quote]
Stephen Redmond
Posts: 190
 
Re: Best way of adding "double-click to edit" functionality?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jan 08 2:30 PM
Yes, introduced in 7.0.

If you like ShowViewForRecord, you should also look at ShowViewForRecordEx which allows you to pass through the bind information of the datagrid (the way it is from the standard Add/Edit invoke).

ShowAddForm is also useful for Adding because it returns the New ID to the script.


Stephen
[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 5:12:35 PM