6/7/2025 3:22:46 PM
|
|
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!
Forum to discuss usage & tips for SalesLogix controls and other 3rd party ActiveX controls. View the code of conduct for posting guidelines.
|
|
|
|
Datagrid, identifying selected column
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? |
|
|
|
Re: Datagrid, identifying selected column
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
|
|
|
|
Re: Datagrid, identifying selected column
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.
|
|
|
|
Re: Datagrid, identifying selected column
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.
|
|
|
|
Re: Datagrid, identifying selected column
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! |
|
|
|
Re: Datagrid, identifying selected column
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. |
|
|
| |
|
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!
|
|
|
|
|
|
|
|