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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:34:53+00:00 2026-05-26T12:34:53+00:00

I created a grid using extjs library. First created a model: Ext.define(‘Option’, { extend:

  • 0

I created a grid using extjs library.

First created a model:

Ext.define('Option', {
    extend: 'Ext.data.Model',
    idProperty: 'OptionId',
    fields: [
        { name: 'TradeDate' },
        { name: 'OptionType' }
    ]
});

Second I created columns array:

var allColumns = [
    {
        text: 'Option Id',
        width: 75,
        sortable: true,
        cls: 'grid-header-LadderStep',
        dataIndex: 'ExternalId',
        renderer: RenderColumn
    },
    {
        text: 'Trade Date',
        width: 65,
        sortable: true,
        cls: 'grid-header-LadderStep',
        dataIndex: 'TradeDate',
        renderer: RenderColumn
    }
]

In column list renderer event is define below:

function RenderColumn (value, metaData, record, rowIdx, colIdx, store, view) {
    metaData.style = 'background-color:#BBD5EE !important';
    return value;
};

How can I know from the RenderColumn function, dataindex that I defined in column list?

It can be ExternalId or TradeDate in case that I described.

I found a solution:

grid.columns[colIdx].dataIndex

Where grid is a global grid variable.

  • 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-26T12:34:53+00:00Added an answer on May 26, 2026 at 12:34 pm

    Ok, so, this has not been documented yet by the Sencha team, but it’s available. You have to do it using a method available on the header container on the grid’s Ext.grid.View:

        renderer: function(val, meta, rec, rowIdx, colIdx, store, view) {
            var column = view.getHeaderAtIndex(colIdx);
            var dataIndex = column.dataIndex;
        }
    

    The reason this works is because Ext.grid.View inherits from Ext.table.View which has a method, getHeaderAtIndex, that is supposed to be public, but has not been documented yet.

    I found out that certain things aren’t documented yet via this

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

Sidebar

Related Questions

I have a problem with a Ext.Grid.EditorGridPanel, I am currently using ExtJS 2.3.0, that
I'm trying to create a dynamic grid using ExtJS. The grid is built and
I want users to be able to filter grid data without using the intrinsic
Hi friends, Am newbie for windows Development .i have created Grid With tabcontrol using
I've created a frame with a 3x3 grid of buttons using this code... JFrame
I have an EXTJS paging grid with checkbox selection model. I want to know
I'm building an application that displays some results in a grid, using the Ext.NET
I have an ExtJS grid like so: var grid = new Ext.grid.GridPanel({ ... });
I am binding the grid view using data table. My task is to add
I created a grid in procedural code on my WPF page. Now I want

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.