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 howeve
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 wrote:
> Hope that helps,
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscri
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 delete
Zryip
Thanks - same problem :(
Gerry
On 9 Jan 2014, at 10:56 am, zryip theSlug wrote:
> Try:
> on deleteRecord whichRow
>dispatch "deleteIndex" to group "datagrid" with whichRow
> end deleteRecord
___
use-livecode mailing list
use-livecode@list
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
O