DataGrid Multiple lines

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

Moderators: Klaus, FourthWorld, heatherlaine, 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 »

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: 10508
Joined: Wed May 06, 2009 2:28 pm

Re: DataGrid Multiple lines

Post by dunbarx »

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 »

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: 10508
Joined: Wed May 06, 2009 2:28 pm

Re: DataGrid Multiple lines

Post by dunbarx »

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 »

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 »

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