Consider this: The visible lines of a data grid correspond to the data grid
rows. Scroll, and the top line becomes data grid line 1, even though it is not
the first line in the data grid. Sort the data grid by another column, and
still, the first visible row is data grid line 1.
Indexes
Hi all
I have a delete button in the row template group of a data grid form.
When the user touches there delete button I do this:
deleteRecord the dgIndex of me
...and I handle that command in the card script with:
on deleteRecord whichRow
dispatch deleteline to group datagrid with
Hi Gerry,
You are passing an index to the deleteline command.
In datagrids, indexes and lines are different things:
http://lessons.runrev.com/s/lessons/m/datagrid/l/7344-data-grid-api
Try:
on deleteRecord whichRow
dispatch deleteIndex to group datagrid with whichRow
end deleteRecord
On
Zryip
Thanks - same problem :(
Gerry
On 9 Jan 2014, at 10:56 am, zryip theSlug zryip.thes...@gmail.com wrote:
Try:
on deleteRecord whichRow
dispatch deleteIndex to group datagrid with whichRow
end deleteRecord
___
use-livecode mailing list
Hi Gerry,
You're passing in the dgIndex of the row, not the line number. The dgIndex
is assigned when data is loaded into the datagrid and never changes which I
think explains your problem.
You can either use deleteIndexes or pass in the dgHilitedLine of the
datagrid and continue to to use
Yep, thanks - it does. I'm now using the line number, not the index :)
Gerry
On 9 Jan 2014, at 1:01 pm, Peter Haworth p...@lcsql.com wrote:
Hope that helps,
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to