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 3500586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:45:09+00:00 2026-05-18T12:45:09+00:00

At first I used the Grid. After creating a new version of the GWT,

  • 0

At first I used the Grid.
After creating a new version of the GWT, I want to replace the Grid on the CellTable.

  • 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-05-18T12:45:09+00:00Added an answer on May 18, 2026 at 12:45 pm

    Check out the javadoc for details. My example is like the one you’ll find there (just a little extended):

    public void onModuleLoad() {
        final CellTable<Row> table = new CellTable<Row>();
    
        TextColumn<Row> firstColumn = new TextColumn<Starter.Row>() {
    
            @Override
            public String getValue(Row object) {
                return object.firstColumn;
            }
        };
        table.addColumn(firstColumn, "header one");
    
        TextColumn<Row> secondColumn = new TextColumn<Starter.Row>() {
    
            @Override
            public String getValue(Row object) {
                return object.secondColumn;
            }
        };
        table.addColumn(secondColumn, "header two");
    
        TextColumn<Row> thirdColumn = new TextColumn<Starter.Row>() {
    
            @Override
            public String getValue(Row object) {
                return object.thirdColumn;
            }
        };
        table.addColumn(thirdColumn, "header three");
    
        table.setRowCount(getList().size());
        final ListDataProvider<Row> dataProvider = new ListDataProvider<Starter.Row>(getList());
        dataProvider.addDataDisplay(table);
    
        final SingleSelectionModel<Row> selectionModel = new SingleSelectionModel<Starter.Row>();
        table.setSelectionModel(selectionModel);
    
        Button btn = new Button("delete entry");
        btn.addClickHandler(new ClickHandler() {
    
            @Override
            public void onClick(ClickEvent event) {
                Row selected = selectionModel.getSelectedObject();
                if (selected != null) {
                    dataProvider.getList().remove(selected);
                }
            }
        });
    
        RootPanel.get().add(table);
        RootPanel.get().add(btn);
    
    }
    
    private class Row {
    
        private String firstColumn;
        private String secondColumn;
        private String thirdColumn;
    
        public Row(String firstColumn, String secondColumn, String thirdColumn) {
            this.firstColumn = firstColumn;
            this.secondColumn = secondColumn;
            this.thirdColumn = thirdColumn;
        }
    
    }
    
    private LinkedList<Row> getList() {
        LinkedList<Row> list = new LinkedList<Row>();
        list.add(new Row("first", "entry", "foo"));
        list.add(new Row("second", "entry", "foo"));
        list.add(new Row("third", "entry", "foo"));
        list.add(new Row("fourth", "entry", "foo"));
        return list;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I struggle to uninstall VS 2010. I downloaded and used first trial version for
I used this code to get the particular column value using jquery.. $(#Grid td:first-child).click(function()
History: I read from one of Knuth's algorithm book that first computers used the
I'm trying to create an application that uses c2dm service. So. First I used
Least Recently Used (LRU) Cache is to discard the least recently used items first
I used cURL to authenticate first then login via POST to a cms. Then
Yesterday I used jQuery UI for the first time and I think I'm going
I used 320andup in order to make my first real responsive website. I managed
I've just used it for the first time - consider: IGameObject void Update() IDrawableGameObject
This is the first time I've used a 3rd party jar, but it seems

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.