JS Days 2025 is now live – Join 5,000+ devs for the premier virtual JavaScript event. Register Now

How to Quickly Customize Ext JS Data Grid (Part 3/6) – Row Editing Methods

March 12, 2020 4408 Views
Show

In this third article of the 6-part “Ext JS Grid Customization” blog series we focus on using row editing methods to customize a data grid. If you missed reading Part 1 and 2 of the series, take a quick read here:
Customize using built-in grid and column properties
Customize using grouping methods

The grid example shown here is a sample NBA 2020 player ratings data.

Cell Editing/Row Editing

Cell Editing/Row Editing

1. Activate plugin in grid configurationplugins: {
cellediting: {
clicksToEdit: 1
}
}

2. Define editor in column configuration (editor can be a textfield, datefield or a numberfield){
dataIndex: ‘position’,
text: ‘Position’,
flex: 1,
editor: {
xtype: ‘combo’,
typeAhead: true,
triggerAction: ‘all’,
selectOnFocus: false,
store: [
‘SG’, ‘PG’,’SF’, ‘C’,’PF’
] }
}

Sencha Fiddle:

RowExpander

Nested rows can be added under grid rows in a few easy steps.

RowExpander

Activate plugin and define template in grid configuration:plugins: {
rowexpander: {
rowBodyTpl: new Ext.XTemplate(

Team: {team}

‘,

Overall rating: {rating:this.formatRating}

‘,
{
formatRating: function(v) {
var color = v >= 85 ? ‘red’ : ‘blue’;
return ‘‘ + v + ‘‘;
}
})
}
}

Sencha Fiddle:

RowWidgets [classic]

Additional widgets (such as panels or even grids) can be added in nested grid rows. Here’s how.

RowWidgets Classic

Activate rowwidget plugin in grid configuration:plugins: {
rowwidget: {
widget: {
xtype: ‘panel’,
title: ‘Panel in rowwidget’,
bind: {
html : ‘{record.bio}’
}
}
}
}

Sencha Fiddle :

Stay tuned for our next article covering ‘Grid Display Data’ Methods.

 

Build Your Data Grid with Ext JS 7.1

The free 30-day trial of Ext JS 7.1 provides full access to the product features. Get started today and see how you can build a high-performing data grid for your application.

 

Jnesis—Sencha’s Select Partner

Does your enterprise need help with IT Strategy and architecture — specifically for Ext JS based web and mobile applications? Jnesis, our official partners in the France and Swiss area since 2013 have many services around the Sencha ecosystem and more. Check them out.

Recommended Articles

Guide to Estimating ROI When Switching From DIY Libraries to Full Software Development Platforms Like Ext JS

Teams started with Do It Yourself, or DIY, JavaScript tools like jQuery and Bootstrap. But those fall apart as projects scale. Scattered code, user interface…

Top Frameworks Developers Are Using for Custom Software Development in 2025

We’re seeing it more every year; teams aren’t settling for plug-and-play tools anymore. In healthcare, finance, logistics, and other data-heavy industries, there’s a clear shift.…

Meet Sencha AI Coding Companion: Your AI-Powered Assistant for Faster Ext JS Development

Building modern web applications should be exciting. But too often, developers find themselves buried in documentation, endlessly Googling framework quirks, or stuck solving the same…

Ext JS 7.9 & Rapid Ext JS V1.1 Have Arrived

The Sencha team is excited to announce the latest Ext JS version 7.9 and Rapid Ext JS 1.1 release – designed to accelerate development, enhance…

Top 10 JS Grid Customization Tips for a Better UI Experience

Grids are pretty much everywhere in web apps. Working with financial sheets, product details, or users? Then you’ve probably used a JavaScript grid. It makes…

Why Ext JS Framework is the Go-To Framework for Building Scalable and Data-Intensive Web Apps

Web apps are much more advanced now. They deal with large amounts of data and need to stay fast, even with many users. If you’re…

View More

Trusted by Top Developers: Learn how to enhance your development journey — for free

Get the latest newsletter keeping thousands of developers in the loop.

Loved by developers at