Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Sorting numbers as string

    Hi
    I'm using the latest smart get build with gwt1.4. I have a list grid column as int but some values are suppose to be null/empty but show up as 0 bc the field and it's content is int. When I make the listgrid field text and my data string, it show the null as empty, which is great but when I sort ascending or descending, it sort the number by 1st digit only so 12 will go before 2 as the one is smaller. Please advise? Any feedbacks will be very appreciated. I have this as a bug for a few weeks now and is desperate to get it fix. Thanks in advance for your time.

    #2
    Declare the field as int, it's still allowed to return nulls. They will not render as 0s unless your server is sending them that way.

    Comment


      #3
      Isomorphic, thank you so much for the quick response.
      It does work as you said.

      I do not know why I had to change the DataSourceField from Int to Text when I changed my data type. If the datatype is String and having the DatasourceField as Int it works and sort properly.

      Thanks again.
      vnta

      Comment

      Working...
      X