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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:36:40+00:00 2026-05-18T11:36:40+00:00

I have the following code in extjs and while rendering it is giving me

  • 0

I have the following code in extjs and while rendering it is giving me error in chrome is

Uncaught TypeError: Cannot read property 'id' of undefined


/*!
 * Ext JS Library 3.3.0
 * Copyright(c) 2006-2010 Ext JS, Inc.
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.chart.Chart.CHART_URL = 'extjs/resources/charts.swf';


Ext.onReady(function(){
    function change(val){
        if(val > 0){
            return '<span style="color:green;">' + val + '</span>';
        }else if(val < 0){
            return '<span style="color:red;">' + val + '</span>';
        }
        return val;
    }
    function pctChange(val){
        if(val > 0){
            return '<span style="color:green;">' + val + '%</span>';
        }else if(val < 0){
            return '<span style="color:red;">' + val + '%</span>';
        }
        return val;
    }
     var url = {
        local:  'grid-filter.json',  // static data file
        remote: 'grid-filter.php'
    };
    var encode = false;
    // configure whether filtering is performed locally or remotely (initially)
    var local = false;
    var store = new Ext.data.JsonStore({
        // store configs
        autoDestroy: true,
        url: (local ? url.local : url.remote),
        remoteSort: false,
        sortInfo: {
            field: 'id',
            direction: 'ASC'
        },
        storeId: 'myStore',

        // reader configs
        idProperty: 'id',
        root: 'data',
        totalProperty: 'total',
        fields: [{
            name: 'id'
        }, {
            name: 'p_name'
        }, {
            name: 'status',
            type: 'string'
        }, {
            name: 'company',
            type: 'string',
        }]
    });

    var createColModel = function (finish, start) {
        var columns = [{
            dataIndex: 'id',
            header: 'Id',
            // instead of specifying filter config just specify filterable=true
            // to use store's field's type property (if type property not
            // explicitly specified in store config it will be 'auto' which
            // GridFilters will assume to be 'StringFilter'
            filterable: true
            //,filter: {type: 'numeric'}
        }, {
            dataIndex: 'p_name',
            header: 'Project',
            id: 'company',
            filter: {
                type: 'string'
                // specify disabled to disable the filter menu
                //, disabled: true
            }
        }, {
            dataIndex: 'status',
            header: 'Status',
            filter: {
                type: 'string'  // specify type here or in store fields config
            }
        }, {
            dataIndex: 'company',
            header: 'Company',
            filter: {
                type: 'string'
                //options: ['small', 'medium', 'large', 'extra large']
                //,phpMode: true
            }
        }, {
            dataIndex: 'visible',
            header: 'Visible',
            filter: {
                //type: 'boolean'  // specify type here or in store fields config
            }
        }];

        return new Ext.grid.ColumnModel({
            columns: columns.slice(start || 0, finish),
            defaults: {
                sortable: true
            }
        });
    };

    //------- END ------//

    //create editor

    // create the Grid


    var grid = new Ext.grid.GridPanel({
        store: store,
        plugins:[editor],
        columns: [sm,
            {
        id:'company',
        header: "Project",
        width: 70, 
        sortable: true,
        dataIndex: 'p_name',
        editor: {
            xtype: 'textfield',
            allowBlank: false
        },
        filter: {
                type: 'string'
                //options: ['small', 'medium', 'large', 'extra large']
                //,phpMode: true
            }
        },
        {
            header: "Status", width: 75, sortable: true,  dataIndex: 'status',
            valueField: "name",displayField: "name", triggerAction: "all",
            filter: {
                type: 'string'
                //options: ['small', 'medium', 'large', 'extra large']
                //,phpMode: true
            },
            editor: {
                xtype: 'combo',
                allowBlank: false
            }},
            {header: "Company", width: 175, sortable: true, renderer: change, dataIndex: 'company',filter: {
                type: 'string'
                //options: ['small', 'medium', 'large', 'extra large']
                //,phpMode: true
            },editor: {
                xtype: 'textfield',
                allowBlank: false

                },}
        ],
        /*------*/
        sm: sm,
        /*------*/

        stripeRows: true,
        autoExpandColumn: 'company',
        height:200,
        width:905,
        frame:true,
        title:'Sliding Pager',
        plugins: [filters],
        autoExpandColumn: 'company',
        listeners: {
            render: {
                fn: function(){
                    store.load({
                        params: {
                            start: 0,
                            limit: 50
                        }
                    });
                }
            }
        },
        bbar: new Ext.PagingToolbar({
            pageSize: 10,
            store: store,
            displayInfo: true
        })
    });
     var filters = new Ext.ux.grid.GridFilters({
        // encode and local configuration options defined previously for easier reuse
        encode: encode, // json encode the filter query
        local: local,   // defaults to false (remote filtering)
        filters: [{
            type: 'numeric',
            dataIndex: 'id',
              disabled: false
        }, {
            type: 'string',
            dataIndex: 'company',
            disabled: false
        }, {
            type: 'string',
            dataIndex: 'p_name',
              disabled: false
        }, {
            type: 'string',
            dataIndex: 'status',
              disabled: false
        },]
    }); 
     var sm = new Ext.grid.CheckboxSelectionModel();
    var editor = new Ext.ux.grid.RowEditor({
     //  saveText: 'Update'
    });
    grid.render('grid-example');
    store.load({params:{start:0, limit:10} });
    //--------------- END ------------//
});

My html code is :

<form id="myform" name="myform">
<table>
    <tr>
        <td height="" valign="top" colspan="3">
            <div id="grid-example">
            </div>
        </td>
    </tr>
</table>
</form>

Please advise what is the problem?

  • 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-18T11:36:41+00:00Added an answer on May 18, 2026 at 11:36 am

    Looking at this quickly, I noticed that you have “id” capitalized as “Id” in one place but lowercase in every other instance. I would start by fixing that and attempting to run it again.

    If that does not fix it, possibly try using something other than “id”? Mainly, I wanted to make you aware of the capitalization.

    var columns = [{
            dataIndex: 'id',
            header: 'Id',
            // instead of specifying filter config just specify filterable=true
            // to use store's field's type property (if type property not
            // explicitly specified in store config it will be 'auto' which
            // GridFilters will assume to be 'StringFilter'
            filterable: true
            //,filter: {type: 'numeric'}
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Have following code: Controller: public ActionResult Step1() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public
I have following Code Block Which I tried to optimize in the Optimized section
I'm trying to use opengl in C#. I have following code which fails with
I have the following code in a web.config file of the default IIS site.
I have the following code: $bind = new COM(LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local); When I execute it from
I have the following code snippet. $items['A'] = Test; $items['B'] = Test; $items['C'] =
I have the following code: SELECT <column>, count(*) FROM <table> GROUP BY <column> HAVING
I have the following code: String inputFile = somefile.txt; FileInputStream in = new FileInputStream(inputFile);
I have the following code: ListBox.DataSource = DataSet.Tables(table_name).Select(some_criteria = match) ListBox.DisplayMember = name The
I have the following code making a GET request on a URL: $('#searchButton').click(function() {

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.