[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Sorting in a grid  XML
Forum Index -> Development
Author Message
kabat

Power User

Joined: 10/12/2007 10:12:44
Messages: 78
Offline

Hi Björn,

I use the sort reference attribute in a grid. In the grid column I defined a label. The sorting works perfectly.
But the problem is that the content of the columns are numbers. And the numbers are of course sorted like Strings. But I would like to sort them like Integers. Is there a way to do that?

Agnes
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

Hi Agnes,

the sorting analyses the data type of the property and then decides if to sort by number or by String. Your server side data type behind the SORTREFERENCE definition seems to be a String.

Either change the data type of the corresponding get-method to be an int (or whatever), or create a second property which passes back the correct data type, and which you then refer in SORTREFERENCE.

You could also override hte FIXGRIDListBinding's sorting, but I think this is much more effort, so better create some additional property.

Björn

Björn Müller, CaptainCasa GmbH
kabat

Power User

Joined: 10/12/2007 10:12:44
Messages: 78
Offline

Mmmh, it's really easy. I didn't think about that labels could reference int properties
Thank you!
kuferstein



Joined: 23/11/2007 12:22:25
Messages: 2
Offline

Hi community,

I use the sorting in the grid and have the following problem:
the cells in the grid, which are empty, when sorting is processed, seems to be not be considered. Has somebody a similar problem / solution for it?

Thank you in advance and friendly greetings!
Igor
 Filename sortierung_falsch.JPG [Disk] Download
 Description
 Filesize 35 Kbytes
 Downloaded:  507 time(s)

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Offline

...sorting of null values is now supported, pls use current release.
Björn

Björn Müller, CaptainCasa GmbH
kuferstein



Joined: 23/11/2007 12:22:25
Messages: 2
Offline

Hi Björn,

thanks for update. The sorting works fine now. The last version (second update of today) is also "not more buggy" regarding to rowbodypane...

Thanks for your fast reaction!
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team