Lowest line in datagrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Lowest line in datagrid
Hi,
Part of my project involves selecting successive lower lines (going down the lines) in a datagrid, using a 'repeat' procedure. Is there any way that it can be detected that the selected line is the bottom line of the dg ? (Not the 'Last' line, which seems to mean the last inputted line, and not the "lowest".
Part of my project involves selecting successive lower lines (going down the lines) in a datagrid, using a 'repeat' procedure. Is there any way that it can be detected that the selected line is the bottom line of the dg ? (Not the 'Last' line, which seems to mean the last inputted line, and not the "lowest".
Re: Lowest line in datagrid
Hi Casba,
I think you need to clarify what you mean:
do you mean the last visible row?
do you mean the last row in of the datagrid?
something else?
I think you need to clarify what you mean:
do you mean the last visible row?
do you mean the last row in of the datagrid?
something else?
Re: Lowest line in datagrid
Hi CAsba,
not sure, do you mean:
?
Best
Klaus
not sure, do you mean:
Code: Select all
...
## This will be TRUE if the selected line = the "last" or "lowest" line
if the dgHilitedlines of grp "your dg" = the dgNumberofLines of grp "your dg" then
...
Best
Klaus
Re: Lowest line in datagrid
Hint: Lines in a datagrid are "seen" like lines in a field.
The line at the top is the first line, the line at the bottom is the last line.
"Last" here does not mean the line "last added"!
This still applies when a field or datagrid has been sorted!
The line at the top is the first line, the line at the bottom is the last line.
"Last" here does not mean the line "last added"!
This still applies when a field or datagrid has been sorted!
Re: Lowest line in datagrid
Hi,
Thanks for that. I think I caused some misunderstanding - what I should have said is that when I tried to use the term 'last' in the code the selection moved to the last line to be entered. Anyway, I'm pretty sure that Klaus's solution, using the number of lines, is the answer - I'll try it tomorrow. Many thanks, Klaus, and also for your perc eptiveness in divining what I meant !
Thanks for that. I think I caused some misunderstanding - what I should have said is that when I tried to use the term 'last' in the code the selection moved to the last line to be entered. Anyway, I'm pretty sure that Klaus's solution, using the number of lines, is the answer - I'll try it tomorrow. Many thanks, Klaus, and also for your perc eptiveness in divining what I meant !
-
- VIP Livecode Opensource Backer
- Posts: 9679
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Lowest line in datagrid
CAsba.
I am not particularly expert at all with DataGrids. So I usually simply extract the entirety of its contents using the "dgText" (or dgData"), and deal with that dataSet using "regular" LC gadgetry, In this case you need not restore that dataSet, since you are only looking for information about it.
Craig
I am not particularly expert at all with DataGrids. So I usually simply extract the entirety of its contents using the "dgText" (or dgData"), and deal with that dataSet using "regular" LC gadgetry, In this case you need not restore that dataSet, since you are only looking for information about it.
Craig