Please tell me there's a way to enable the selection of multiple, non-consecutive lines in the Data Grid?
In every other app I can command-click various lines to hilite them. Not on LC's data grid. I know I can use Shift-click to get consecutive lines, but I (and my users will) also want to be able to do non-consecutive selections.
Native way for discontiguous selection in Data Grid?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 234
- Joined: Thu Jul 01, 2010 11:50 am
Re: Native way for discontiguous selection in Data Grid?
Check "multiplelines" in the inspector for your datagrid and CMD-click works as exspected.
-
- Posts: 234
- Joined: Thu Jul 01, 2010 11:50 am
Re: Native way for discontiguous selection in Data Grid?
I had that selected already, b/c I could select multiple consecutive lines, just not multiple non-consecutive lines.
Anyway, I figured out the problem: There's a data grid lesson that's ironically titled "how to add a mousedown to the data grid without breaking it", because following those instructions is what *breaks* my data grid. The article says I have to add a call to dgMouseDown, but that's what's preventing the discontiguous selections. Once I remove the call to dgMouseDown, I can select discontiguous lines just fine.
So that brings me to the question I asked in the other thread: Is calling dgMouseDown really necessary? The docs say it is, but my code seems to return the correct clicked line without it. I really want to ditch it, because I can't get discontiguous selections when it's present.
Anyway, I figured out the problem: There's a data grid lesson that's ironically titled "how to add a mousedown to the data grid without breaking it", because following those instructions is what *breaks* my data grid. The article says I have to add a call to dgMouseDown, but that's what's preventing the discontiguous selections. Once I remove the call to dgMouseDown, I can select discontiguous lines just fine.
So that brings me to the question I asked in the other thread: Is calling dgMouseDown really necessary? The docs say it is, but my code seems to return the correct clicked line without it. I really want to ditch it, because I can't get discontiguous selections when it's present.
Re: Native way for discontiguous selection in Data Grid?
You could workaround it by:
Tested and works with dis- and contiguous line selection, as far as I can tell.
You should report this (dgmousedown prevents discontiguous selection) as a bug here:
https://quality.livecode.com
Code: Select all
on mousedown buttonNumber
if the commandkey <> "down" then
dgmousedown buttonNumber
end if
## your mousedown stuff here...
end mousedown
You should report this (dgmousedown prevents discontiguous selection) as a bug here:
https://quality.livecode.com
-
- Posts: 234
- Joined: Thu Jul 01, 2010 11:50 am
Re: Native way for discontiguous selection in Data Grid?
Thank you, klaus. I should have figured out to move the dgMousedown call to inside an _if_.
I filed a bug report.
Looks like there are over 100 confirmed bugs for the data grid. (Searching "data grid" vs "datagrid" returns a different set of results.)
I filed a bug report.
Looks like there are over 100 confirmed bugs for the data grid. (Searching "data grid" vs "datagrid" returns a different set of results.)