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

  • Home
  • SEARCH
  • 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 8855223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:05:13+00:00 2026-06-14T14:05:13+00:00

I want to add textfield into tbar in Grid panel, but it does not

  • 0

I want to add textfield into tbar in Grid panel, but it does not work.

And I tried with button then it works..

This code is not working, the error message say, TypeError: g.el is null

var grid = Ext.create('Ext.grid.Panel', {
...
tbar : [
  {
     xtype : 'textfield',
     name : 'test'
  }
]
});

But this code is working,

var grid = Ext.create('Ext.grid.Panel', {
...
tbar : [
  {
     xtype : 'button',
     text : 'keyword'
  }
]
});

Anybody know, why it happened?

I found,

it renderTo : ‘tableID’, but I changed to renderTo : Ext.getBody()

then it works. but I want to put the grid into specific html element, how should I do?

[Edit]

I want to insert to #listTable,

<div id="wrap">
    <table id="listTable"></table>
</div>

I just tried to ‘wrap’ then it works,

So I tried, renderTo : ‘wrap > listTable’

but it does not work 🙁

  • 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-14T14:05:14+00:00Added an answer on June 14, 2026 at 2:05 pm

    The code below works without any error in 4.1.3. It may be a bug in your version? You can test it in one of the API demo boxes. Just copy paste it. The tbar prop is ah shorthand for a dockedItem that get applied to top. A passed array get automatically inserted into a toolbar. Nothing more happends. So it must work

    Ext.create('Ext.data.Store', {
        storeId:'simpsonsStore',
        fields:['name', 'email', 'phone'],
        data:{'items':[
            { 'name': 'Lisa',  "email":"lisa@simpsons.com",  "phone":"555-111-1224"  },
            { 'name': 'Bart',  "email":"bart@simpsons.com",  "phone":"555-222-1234" },
            { 'name': 'Homer', "email":"home@simpsons.com",  "phone":"555-222-1244"  },
            { 'name': 'Marge', "email":"marge@simpsons.com", "phone":"555-222-1254"  }
        ]},
        proxy: {
            type: 'memory',
            reader: {
                type: 'json',
                root: 'items'
            }
        }
    });
    
    Ext.create('Ext.grid.Panel', {
        title: 'Simpsons',
        tbar: [
          {
             xtype : 'textfield',
             name : 'test'
          }
        ],
        store: Ext.data.StoreManager.lookup('simpsonsStore'),
        columns: [
            { text: 'Name',  dataIndex: 'name' },
            { text: 'Email', dataIndex: 'email', flex: 1 },
            { text: 'Phone', dataIndex: 'phone' }
        ],
        height: 200,
        width: 400,
        renderTo: Ext.getBody()
    });
    

    Edit

    renderTo requires a valid id, a HTML Element or Ext.Element

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

Sidebar

Related Questions

I want to add and fetch the value from dynamically created textfield with tag
Hey guys, I'm trying to add a textfield.text entry to an array. I want
I want add UIGestureRecognizerDelegate to UIWebView,but failed. if [self.view addsubView:webView]; So UIWebView is ok,but
I have a sprite that contains a textfield. Then, I want to create a
I want to get value in a date picker and add to textfield_date..I used
I want to have a Form that can Add or Delete TextFields. I was
i want to ask. How to add break after paragraph in one text field
d1=new JDialog(); d1.setSize(200, 100); t1=new JTextField(); t1.setBounds(10,10,40,20); d1.add(t1); I want to add components in
I want add new Feed item on entity persist and update. I write this
I want add label to every row in tableview at right side of the

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.