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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:42:12+00:00 2026-06-01T09:42:12+00:00

is it possible to use GXT’s binding mechanism to bind a Grid to an

  • 0

is it possible to use GXT’s binding mechanism to bind a Grid to an Html (or other Widget implementation for that matter)?

it seems from the examples that it’s only applicable for forms (FormBinding), while my purpose is to have a Template updating a widgets inner element, driven by the grid’s SelectionChangedEvents sending the models for that template.

  • 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-01T09:42:13+00:00Added an answer on June 1, 2026 at 9:42 am

    Binding grids and generic components directly is apparently not possible at the current version of GXT, anyhow this is an alternative solution offered as a workaround:

    I just made use of the examples Grid Binding and Templates to support your requirement. Here is the modified code

    @Override
    protected void onRender(Element parent, int index) {
        super.onRender(parent, index);
        setStyleAttribute("margin", "10px");
    
        ContentPanel cp = new ContentPanel();
    
        cp.setHeading("Form Bindings");
        cp.setFrame(true);
        cp.setSize(800, 400);
        cp.setLayout(new RowLayout(Orientation.HORIZONTAL));
    
        final LayoutContainer panel = new LayoutContainer(new FlowLayout());
    
        Grid<Stock> grid = createGrid();
        grid.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
    
        final Template template = new Template(getTemplate());
        grid.getSelectionModel().addListener(Events.SelectionChange, new Listener<SelectionChangedEvent<Stock>>() {
            public void handleEvent(SelectionChangedEvent<Stock> be) {
                if (be.getSelection().size() > 0) {
                    template.overwrite(panel.getElement(), Util.getJsObject(be.getSelectedItem()));
                } else {
                    panel.removeAll();
                }
            }
        });
        cp.add(grid, new RowData(.6, 1));
        cp.add(panel, new RowData(.4, 1));
    
        add(cp);
    }
    
    private native String getTemplate() /*-{
        var html = [ '<p>Name: {name}</p>', '<p>Symbol: {symbol}</p>',
                '<p>Last: {last}</p>', '<p>Last Updated: {date}</p>', ];
        return html.join("");
    }-*/;
    

    Add these modifications to the Grid Binding example. Hope this helps.

    Thanks,
    Ganesh

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use a flash document embedded in HTML as a link?
Recently I asked a question on SO that had mentioned the possible use of
I'm researching the possible use of the jquery plugin chain.js over other templating systems
Is it possible use mod_rewrite to resolve addresses hosted on another server? Say I
Is it possible use a MySQL query to perform this kind of check? If
I have recently started looking into Google Charts API for possible use within the
I need a control having these features: It should be possible use it in
Possible Duplicate: Use SVN Revision to label build in CCNET I'm working through the
Is possible to use ArcSDE API in .NET(C#) ? http://edndoc.esri.com/arcsde/9.2/api/capi/dbconnects/dbconnects.htm Thanks
Is it possible to use Apache Subversion (SVN) as general purpose backup tool? (As

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.