remove empty lines in DG

JJS jjs at krutt.org
Mon Dec 10 12:11:11 EST 2018


I could delete the empty lines by dispatching delete to the DG.

But this was not a solution to the cause.

Now it seems it happens when fetching from the DB. Now as everything is 
encrypted, i can't see which line in the DB is empty.

So have to check if i can find the exact lines causing it, which is 
really strange. Because when they finally arrive in the DG they have no 
no corresponding to the db.

So it looks like it is no fault somewhere in LC.

At least i can find empty line in the fetched results and delete them, 
causing the data nicely to appear at the top in the DG.

Thanks!

Jerry


Op 8-12-2018 om 19:05 schreef JJS via use-livecode:
> Thanks Bob
>
> i will check out your suggestion.
>
> Jerry
>
> Op 8-12-2018 om 01:18 schreef Bob Sneidar via use-livecode:
>> This can happen if there are keys in the data that are not numbered. 
>> Try getting the dgData of the datagrid and examining the array in the 
>> debugger. That should show you your keys. You can possibly do a 
>> repeat with i = 1 to <the highest numerical key in the array> and 
>> populate another array with the records from the original array, then 
>> set the dgData to the new array.
>>
>> Bob S
>>
>>
>>> On Dec 7, 2018, at 11:16 , JJS via use-livecode 
>>> <use-livecode at lists.runrev.com> wrote:
>>>
>>> Hi,
>>>
>>>
>>> i don't know why but with one stack i have when the DG is populated, 
>>> empty lines at the top which i can't seem to remove.
>>>
>>> Data is being fetched from a DB, then base64decoded, then decrypted. 
>>> In neither state i could find an empty line.
>>>
>>> Now it seems only with this stack on windows.
>>>
>>> The same trick i do on windows and mobile with other stacks and the 
>>> DG and this seems to work ok.
>>>
>>> I tried to remove the empty lines but no luck. and also:
>>>
>>>
>>> *--set the dgProp["sort by column"] of group "DataGrid 1" of card 1 
>>> to "Nummer"*
>>>
>>> *dispatch*"SortByColumn"to*group*"DataGrid 1"ofcard1with"Nummer"
>>>
>>> Anyone has a trick? before i decide to delete the DG and replace 
>>> with a new one.
>>>
>>>
>>> thanks!
>>>
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list