mergDataGridScrolle: hilite a line from a different datagrid

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
trevix
Posts: 1079
Joined: Sat Feb 24, 2007 11:25 pm
Contact:

mergDataGridScrolle: hilite a line from a different datagrid

Post by trevix » Wed Jul 27, 2016 3:48 pm

I am try to have a line in DG1 to highlight when a click a line on DG3
The script, on the RowBehavior of DG3, looks like this:

Code: Select all

on MouseUp
     --get the data of the hilited line of DG3
    put the dgDataOfLine[the dgHilitedLines of me] of me into theDataA
    put theDataA["Dossier"] into tDossier 
--find the line of what you are looking for
    put the dgData of grp "DG1" into tArrayData 
    repeat for each line tNum in the keys of tArrayData
        if tArrayData[tNum]["DossierName"] = tDossier then
            exit repeat
        end if
    end repeat
--now you have a number: tNum
    set the dgHilitedIndex of grp "DG1" to tNum
focus on grp "DG1"
    pass MouseUp
end MouseUp
The hilited line of DG1 becomes grey, instead of the color it gets when you click on it.
The auto-hilite row of DG1 is true.
I understand that both DG can not be hilited in the same time but changing the focus (focus on "DG1") does not solve the problem.
Thanks for any help
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>

Post Reply