01-15-2012 05:04 PM
Hi,
I have a DataGrid like below. The DataGrid on the left side, I have two events, one is when a row is selected, it will populate some details of that row in the right DataGrid. The other even is when the Junket Operator Column Hyperlink is clicked, then it will show some other details.
Currently the DataGrid only performs the first event and the second event is eaten. Just want to ask how to make the JunketOperator hyperlink working?
Also in SalesLogix, for DataGrid, is there any function I can get the current selected field? I know there is a function to get current selected row, but I need more to get the selected data cell. Can anyone give me any help?
Thanks a lot!
01-16-2012 12:07 AM
You can use DataGridName.GetSelectedField(“youfield”). For the datagrid events – double click the OnHyperLinkStart and then put your stuff in there.
01-16-2012 02:08 PM
Thanks a lot.
I have added code to OnHyperLinkStar. The problem here is the event is eaten, it is never called. Because any click to the hyperlink is considered as the selection of the row and trigger the OnRowSelect event only.
01-16-2012 02:25 PM
Also there is no GetSelectedField function. What I want is I need to check when the datagrid is selected, I need to know whether the selection is on Junket Operator Column. Something like datagrid.selectedColumnName == "Junket Operatoer"...
01-16-2012 03:03 PM
Are you sure (a) that you have selected the Columns propert, selected the column and change the column type to Hyperllink. Also, if so, can you check the property for the hyperlink is set to Single Click.
01-16-2012 03:05 PM
100% sure
01-16-2012 03:06 PM - edited 01-16-2012 03:07 PM
colData = dgYourGridName.GetCurrentField("yourcolname")
01-16-2012 03:13 PM
That's not what I want.
I don't know the column name selected before hand, so I want to check what column has been selected. Your suggestion is to get the selected column data, but I don't know "yourcolname" in my case.
I need something like datagrid.getSelectedColumnName() or datagrid.getSelectedColumnIndex ....
01-17-2012 05:08 AM
1. you can't have RowSelect checked on for the grid and expect individual cell actions to fire off (like a hyperlink).
2. There is an onedited and an onediting event for the cells. You can detect the field name in the onediting event.
The onedited event has already fired off your grid edit BTW.....it's one of those 'things' about SLX.