DataGrid Multiple lines

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dantomlin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue Feb 26, 2008 4:07 pm

DataGrid Multiple lines

Post by dantomlin » Fri Feb 19, 2016 8:12 pm

I know how to get one line of a datagrid that is highlighted but how do I get multiple lines of data when I allow multi row highlights?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: DataGrid Multiple lines

Post by dunbarx » Fri Feb 19, 2016 8:50 pm

Hi

Does the "dgHilitedLines" do what you need? This is a comma delimited list.

Craig Newman

dantomlin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 43
Joined: Tue Feb 26, 2008 4:07 pm

Re: DataGrid Multiple lines

Post by dantomlin » Fri Feb 19, 2016 9:11 pm

yes, that worked and then I had to do repeat process to get the id's of the highlighted lines.

thanks

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: DataGrid Multiple lines

Post by dunbarx » Fri Feb 19, 2016 9:14 pm

Sure. Once you get that list, the only way to act on each line is, well, one at a time.

Craig

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: DataGrid Multiple lines

Post by sritcp » Sat Feb 20, 2016 3:41 pm

dantomlin wrote:......and then I had to do repeat process to get the id's of the highlighted lines.
the dgHilitedIndexes
will give you the indexes of the highlighted lines directly.

Regards,
Sri

sritcp
Posts: 431
Joined: Tue Jun 05, 2012 5:38 pm

Re: DataGrid Multiple lines

Post by sritcp » Sat Feb 20, 2016 3:50 pm

dunbarx wrote:... Once you get that list, the only way to act on each line is, well, one at a time.
deleteIndex
deleteLine
RefreshIndex
RefreshLine
etc.
take a list of indexes or line numbers as argument.

Regards,
Sri

Post Reply