Umbro
Umbro

Reputation: 2204

Why I can not use Ext.grid.Grid?

I have a problem with the ExtJS 6 framework. When I use Ext.grid.Panel it works, but I want to use Ext.grid.Grid. What is the difference between Ext.grid.Panel and Ext.grid.Grid?

Ext.create('Ext.grid.Grid', {
    columns: [{
        width: 200,
        dataIndex: 'firstName',
        flex: 1,
        text: 'First Name'
    }, {
        width: 200,
        dataIndex: 'lastName',
        flex: 1,
        text: 'Last Name'
    }],
    renderTo: Ext.getBody()
});

Upvotes: 0

Views: 212

Answers (2)

Avee
Avee

Reputation: 45

If you go through docs it clearly says Ext.grid.Grid component is only present in modern toolkit . If you want to use Grid in classic toolkit you have to use Ext.panel.grid .

here is the link to follow

enter image description here

Upvotes: 1

Robert Watkins
Robert Watkins

Reputation: 2206

The Ext.grid.Panel class belongs to the Classic framework, used for desktop websites. The Ext.grid.Grid class belongs to the Modern framework, used primarily for mobile websites.

If you want to use Ext.grid.Grid, you need to switch to the Modern framework. The ExtJS documentation covers how to select a framework to use (including how to use both frameworks within a single application).

Upvotes: 1

Related Questions