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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:15:19+00:00 2026-06-09T00:15:19+00:00

I have defined xtype that is simple grid with 2 columns and selModel: Ext.selection.CheckboxModel.

  • 0

I have defined xtype that is simple grid with 2 columns and selModel: Ext.selection.CheckboxModel.

Ext.define('MySimpleType',
{
    extend: 'Ext.grid.Panel',
    alias: 'widget.MySimpleXType',
    autoScroll: true,
    store: mySimpleStore,
    selModel: Ext.create("Ext.selection.CheckboxModel", {
        checkOnly : true
    }),
    border: false,
    columns: [
        {
            header: 'Code',
            flex: 1,
            sortable: true,
            dataIndex: 'Code'
        },
        {
            header: 'Name',
            flex: 1,
            width: 80,
            sortable: true,
            dataIndex: 'Name'
        }
    ]
});

When I am trying to use this xtype several times in one panel: instead of creating new CheckboxModel for each usage, each xtype uses the same instance of already created CheckboxModel. In this case several checkbox columns appears in first grid and don’t behave in the proper way.
Could you please give me some idea of how to fix this?
The simplest solution is to create new Ext.selection.CheckboxModel instance for every xtype usage, but it makes code copy-pasted.

  • 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-09T00:15:22+00:00Added an answer on June 9, 2026 at 12:15 am

    The solution is moving selModel definition to initComponent property of the grid:

    Ext.define('MySimpleType',
    {
        extend: 'Ext.grid.Panel',
        alias: 'widget.MySimpleXType',
        autoScroll: true,
        store: mySimpleStore,
        border: false,
        columns: [
            {
                header: 'Code',
                flex: 1,
                sortable: true,
                dataIndex: 'Code'
            },
            {
                header: 'Name',
                flex: 1,
                width: 80,
                sortable: true,
                dataIndex: 'Name'
            }
        ],
        initComponent: function(){
            this.selModel = Ext.create("Ext.selection.CheckboxModel", { checkOnly : true });
            this.callParent(arguments); //it's necessary to call in order to initialize parent components of this grid
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a menu which is defined like that: Ext.define('MyApp.FileBrowserContextMenu', { extend: 'Ext.menu.Menu', initComponent:
I have the following Viewport that houses my app... Ext.define('my.view.Viewport', { extend: 'Ext.Viewport', id:
I've got a carousel defined. Ext.define('rpc.view.bible.indexView', { extend: 'Ext.Carousel', alias: 'widget.bible-indexView', direction: 'horizontal', directionLock:
I have a Grid as a root container with two columns defined (There's only
I have a simple WPF ListView with two columns defined. By default when you
I have a grid in my application that is configured with xtype : 'pagingtoolbar'
I have defined following control template for my custom control. <ControlTemplate TargetType={x:Type local:CustomControl}> <Grid
I have defined CSS in MasterPage so that all pages can use the same
I have a simple style for label controls. I'd like to define a control
I want' to define that every control of specific type inisde a grid gets

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.