Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8062973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:51:41+00:00 2026-06-05T10:51:41+00:00

I am implementing a GWT CellTable with paging and sorting by multiple columns dynamically.

  • 0

I am implementing a GWT CellTable with paging and sorting by multiple columns dynamically.
The basics can be found in the CellTable Developer’s Guide.

However, the dynamic example does not tell how to find out by which column the user wants to sort (it simply sorts by the ‘name’ column). That’s not enough in my case, as I want to allow the user to sort by different columns.

The only solution I could think of, which is not very elegant, is to keep track of which column is sorted in ascending order or not (using table.getColumnSortList(indexOfColumn).isAscending()) and then figuring out which one has been clicked by comparing the values for each column (the one that changed is probably what the user clicked).

This involves keeping information in my classes that should be available somewhere in the CellTable! But I can’t find that information!

Thanks for any help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T10:51:43+00:00Added an answer on June 5, 2026 at 10:51 am

    I found the answer. As explained in the javadocs for com.google.gwt.user.cellview.client.ColumnSortList:

    An ordered list containing the sort history of Columns in a table. The 0th item is the ColumnSortInfo of the most recently sorted column.

    So, to know which column was last sorted by, you simply do:

    ColumnSortInfo info = table.getColumnSortList().get(0);
    Column<Type> sortByColumn = info.getColumn();  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was looking for a simple framework for implementing Comet for my GWT application.
I've been implementing a GWT application that calls a REST-service (which we're also developing).
Gwt -> RPC -> MongoDB (Morphia) Caused by: java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method)
I'm working on a implementing a SNMP into a GWT project. I need to
I'm implementing a web app, which uses sessions. I'm using GWT and app engine
I was thinking about implementing an application in Java (with a GWT GUI) that
I'm writing my first GWT application and i'm at the point of implementing sessions.
Implementing ArrayAccess Interface in PHP , We can access Object Properties as Array Keys
i am implementing my first GWT application currently, i just have a quick question
Iam implementing facebook and twitter using sharekit for an iphone app. How can we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.