Author Topic: UIGrid custom sort  (Read 6771 times)

nguiman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
UIGrid custom sort
« on: April 11, 2014, 05:48:25 PM »
how do I use a custom sort for UIGrids?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid custom sort
« Reply #1 on: April 12, 2014, 04:39:08 AM »
Derive a script from UIGrid and override its Sort() function.

nguiman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: UIGrid custom sort
« Reply #2 on: April 16, 2014, 02:17:24 PM »
so Sorting.Custom is not being used? Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIGrid custom sort
« Reply #3 on: April 17, 2014, 10:53:58 AM »
"Custom" means user-defined, and you have to define it. Current version of NGUI in the pro repository has an improved grid that uses a callback instead of a derived function.

nguiman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: UIGrid custom sort
« Reply #4 on: April 29, 2014, 10:05:28 AM »
thanks, i'm looking forward to using the latest version for the next game!
maybe i can import just that script