Page 1 of 1

Reindex Datagrid / Access to Index

Posted: Fri Sep 18, 2020 10:53 am
by ace16vitamine
Dear all,

is there any chance to reindex my DataGrid without exporting/importing the Datas?

I ask because after I fill this DataGrid I am using

Code: Select all

   
   dispatch "SortDataByKey" to group "tabelle1" of card "main" with "mobile_sortieren", "numeric", "ascending", "false"
   dispatch "RefreshList" to group "tabelle1" of card "main" 
   
to sort the information with the item mobile_sortieren. Then I am able to click on a entry in my DataGrid and open the informations in another card. From there I want to "Swipe" forward / backward. But my problem is that the Index is now sorted (e.g. 5,2,4,3,1) and I have no Idea how to access the information for e.g. before/afterwards index 4 because I can not work with 4-1 or 4+1.

Q1: How can I reindex the DataGrid after the sorting
Q2: How can I read out the keys from the Index of a DataGrid (e.g. 5,2,4,3,1) , is there any command?

Thanks
Stefan

Re: Reindex Datagrid / Access to Index

Posted: Sat Sep 19, 2020 6:54 pm
by dunbarx
Hi.
Q1: How can I reindex the DataGrid after the sorting
I never do. I massage everything in either the dgText or the dgData and reload. Much more comfortable for me than to fool around with the data grid API.
Q2: How can I read out the keys from the Index of a DataGrid (e.g. 5,2,4,3,1) , is there any command?
The dgData is an array containing the entire contents of the DG. You can work directly in there, no?

Craig

Re: Reindex Datagrid / Access to Index

Posted: Sun Sep 20, 2020 10:38 am
by Klaus
Hi Stefan,

can't you use LINE instead of INDEX?
With "dghiliteslines", "dgIndexOfLine", "dgDataOfLine", "the dgline of grp xyz" etc.?


Best

Klaus