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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:38:30+00:00 2026-05-28T14:38:30+00:00

So if I have a gridpanel in ExtJS 4, how do I check for

  • 0

So if I have a gridpanel in ExtJS 4, how do I check for a value in it?

I’m building a pop-up window to add a value to the gridpanel, and I want to make sure that the value the user is trying to add to the gridpanel isn’t already listed in the grid panel.

I’ve been searching the docs for a while and googling around and haven’t found anything.

  • 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-28T14:38:31+00:00Added an answer on May 28, 2026 at 2:38 pm

    I added the following code to the bottom of the example at http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/grid/array-grid.html

    Hopefully it’s a start for you, though you might have additional things to consider such as the following in order to devise the most robust solution:

    • What if the same value can occur multiple times in the grid?
    • What if the data in the grid is paginated?

    CODE:

    dockedItems: [{
            xtype: 'toolbar',
            items : [ {
                xtype: 'button',
                text: 'Seek Value',
                handler: function() {
            Ext.Msg.prompt('Value in Grid?', 'Search:', function(btn, text){
                    if (btn == 'ok' && text){
                        var columnNames = Ext.Array.pluck(grid.columns, 'dataIndex');
    
                        grid.store.data.each(function(record, index) {
                            for (var i=0,n=columnNames.length; i<n; i++) {
                                var columnName = columnNames[i];
    
                                if (columnName) { //protects against null dataIndex using pluck above
                                    if (record.get(columnName) == text) {
                                        console.log(index); //row
                                        console.log(columnName);
                                        return;
                                    }
                                }
                            }
                        });
                    }
            });
                }
            }],
            dock: 'bottom'
        }]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a gridpanel using Extjs that shows the content of a database.
I have a GridPanel that is backed by a DataStore (ExtJS 4). OK, so
I building my ExtJS 4 application following the MVC structure. I want to make
I have ExtJS View-Port panel , that contain center panel, that contain tablpanel ,
I have a MVC app built with extJS 4. I want to disable a
I am creating a page that only contains a gridpanel, I want my gridpanel
Using 4.0.6 I have a gridpanel with an actioncolumn that has two items, a
I have an ExtJS based application. When editing an object, an ExtJS window appears
I have the following extjs code that createa 2 tabs and a grid. How
I'm new in Ext and I have a problem: I'm trying to fill extjs-grid

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.