Sorting issue in a datagrid

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorting issue in a datagrid

André Bisseret
Bonjour,

I have a data grid (table) with 3 columns, forty lines (currently).

When clicking on the header of column 1 or column 3 all is working well (the lines are sorted as expected)
But, when clicking on the header of column 2, only the 8 first lines remain (correctly sorted). All the other lines disappear!
Now, if I sort column 1 and then I sort again column 2, only 3 lines are remaining in the datagrid!

For a couple of hours I tried to find what was wrong in my setting ; changed the header of column 2, built a brand new data grid, …
 but with no avail!
I am lost

First time I get such an issue in a data grid.
 
any idea on what could be happening would be very much appreciated

 Best regards

André
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

Marek
What is the kind of data and kind of sort for this column?

Marek

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

Dave Kilroy
Yes I'm with Marek in wondering about the data you have in column 2 - also - could there be anything in name of column 2 which might confuse the engine? And one last thing, do you have any other data grids in your app? If so what are they (and their columns) called and do they also exhibit any strange behaviour?
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

André Bisseret
In reply to this post by Marek

Le 31 mars 2014 à 21:31, Marek Niesiobedzki a écrit :

> What is the kind of data and kind of sort for this column?
>
> Marek

Words or short phrases (titles of recipes) with "international" as sort type (it is in french).

Thanks for your attention
André
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

André Bisseret
In reply to this post by Dave Kilroy

Le 31 mars 2014 à 21:59, Dave Kilroy a écrit :

> Yes I'm with Marek in wondering about the data you have in column 2 -
As I answered to him, french words or phrases
> also -
> could there be anything in name of column 2 which might confuse the engine?

the name of column 2 is "Titre" (means "title") I don't think it is confusing (?)

> And one last thing, do you have any other data grids in your app? If so what
> are they (and their columns) called and do they also exhibit any strange
> behaviour?

No other data grid in my app

Thank you for your attention

André
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

Dave Kilroy
"Titre" seems fine to me - I'm starting to grasp at straws here...

If your dg sort fails after row 8, what data is in row 9? Could there be an invisible character that is causing the problem? Have at look at the text in BBEdit or similar?
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

André Bisseret

Le 1 avr. 2014 à 10:45, Dave Kilroy a écrit :

> "Titre" seems fine to me - I'm starting to grasp at straws here...
>
> If your dg sort fails after row 8, what data is in row 9? Could there be an
> invisible character that is causing the problem? Have at look at the text in
> BBEdit or similar?

I tried to test this hypothesis with a normal field (say fldTest) : I put the dgText of the data grid in a field ;
then setting the itemDelimiter to tab
sort lines of fld "fldTest" international by item 2 of each :

works fine! so my feeling is that it would not be a problem of invisible character (…?)

Thanks a lot Dave for your attention to my problem

André


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

André Bisseret
In reply to this post by Dave Kilroy

Le 1 avr. 2014 à 10:45, Dave Kilroy a écrit :

> "Titre" seems fine to me - I'm starting to grasp at straws here...
>
> If your dg sort fails after row 8, what data is in row 9? Could there be an
> invisible character that is causing the problem? Have at look at the text in
> BBEdit or similar?

Dave,

You were right !

Zryip TheSlug had a look at my datagrid, and saw that there were invisible characters after some of the phrases to be sorted( NULL character : ascii 0).
Seems that such a character  don't disturb the sort process in a field (but in a data grit it does).

So my problem is solve ;-)) (if charToNum(last char of line li = 0 then delete last char...)

Thank you much

André




_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Sorting issue in a datagrid

Dave Kilroy
In reply to this post by André Bisseret
Good old Zyrip - the best coding slug/man combination in the known universe!
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham