Introducing React ReExt – Sencha Ext JS Components in React! LEARN MORE

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

March 12, 2020 114 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

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.

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.

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.

Show
Start building with Ext JS today

Build 10x web apps faster with 140+ pre-build components and tools.

Latest Content
Discover the Top 07 Architecture Patterns used in Modern Enterprise Software Development

Developing software without an architecture pattern may have been an option back then. However, that’s…

JavaScript Design Patterns: A Hands-On Guide with Real-world Examples

As a web developer, you know how popular JavaScript is in the web app development…

Virtual JS Days 2024のハイライト

2024年2月20日~22日、第3回目となる「Virtual JavaScript Days」が開催されました。JavaScript の幅広いトピックを採り上げた数多くのセッションを実施。その内容は、Senchaの最新製品、ReExt、Rapid Ext JSまで多岐にわたり、JavaScriptの最新のサンプルも含まれます。 このカンファレンスでは多くのトピックをカバーしています。Senchaでセールスエンジニアを務めるMarc Gusmano氏は、注目すべきセッションを主催しました。Marc は Sencha の最新製品「ReExt」について、詳細なプレゼンテーションを実施。その機能とメリットを、参加者に理解してもらうべく詳細に説明しました。 カンファレンスは、Senchaのジェネラルマネージャを務めるStephen Strake氏によるキーノートでスタートしました。キーノートでは、会社の将来のビジョンについての洞察を共有しています。世界中から JavaScript 開発者、エンジニア、愛好家が集まるとてもエキサイティングなイベントとなりました。これは、JavaScript…

See More