Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, June 7, 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 - Controls
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Controls | New ThreadView:  Search:  
 Author  Thread: Datagrid, identifying selected column
Scott Smallbeck
Posts: 7
 
Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 26 May 07 1:38 AM
fiogf49gjkf0d
I have a datagrid with an Account column and a Contact column. On double-click of a particular account cell I want to jump to that account, double-click on a contact cell and jump to that contact.

I have not been able to find a property that let's me know which column is selected. Any help?
[Reply][Quote]
RJ Eaton
Posts: 234
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 27 May 07 10:22 AM
use the datagrid getcurrentfield("fieldyouwant") to see which was clicked..

So on Doubleclick event.

If datagrid.getcurrentfield("AccountId") then
do what you want
ElseIf datafrid.getcurrentfield("ConactId") then
do the other thing
End If

Something like this
[Reply][Quote]
Scott Smallbeck
Posts: 7
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 May 07 6:32 PM
That was my thought as well but getcurrentfield with no parameters returns the primarykeyid for the datagrid and getcurrentfield("AccountID"), etc. returns nothing.

This is 7.0.1, seems like it should be a no brainer.
[Reply][Quote]
Scott Smallbeck
Posts: 7
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 28 May 07 6:47 PM
Ok, figured out how to user getcurrentvalue, need to use name of column as specified in SQL query i.e. A2_Account.

Still can't tell which one was clicked, getcurrentvalue("A2_Account") returns the account name whether I click on the Account cell or the Contact cell.

[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 07 10:22 AM
I don't believe you can determine which column a user clicked on just based on the clicks alone, whether a single or double click. You have about three choices on this one, I think:
1) Just do 2 menu items on the popup menu and that say "Go to Account" and "Go to Contact." Same amount of clicks, technically, but the clicks have to be a little slower.
2) When double-clicked, pop a small window with two buttons that say "Go to Account" and "Go to Contact." Extra click, but another route to take, nevertheless.
3) You can actually put hyperlinks in the cells, so that the user can click on a "hyperlinked" account name or a "hyperlinked" contact name, and take the user to the appropriate location. This is even one less click than the double-click (although they can probably double-click without harm), and it should do the same thing. The only problems with this approach is that it'll look a little different with hyperlinks (and you have to click on the name, not just the cell) and I haven't actually tested this before.

Good luck!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 07 4:16 PM
I'd go the route of using hyperlink columns. I think this would make things a lot more clear to the end user anyway. The OnHyperlinkStart event fires when a hyperlink column is clicked. It will pass to you the column that the hyperlink is for.
[Reply][Quote]
Scott Smallbeck
Posts: 7
 
Re: Datagrid, identifying selected columnYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 07 11:26 PM
Hyperlinked column works perfect. Thanks everyone.
[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/7/2025 11:52:43 AM