PDA

View Full Version : [FIXED] When feature.Grouping is used, adding new record to the grid doesn't work correctly



canxss
5 Apr 2013, 6:30 AM
REQUIRED INFORMATION
Ext version tested:

Ext-4.2.1.736
Browser versions tested against:

FF 19.0.2
Description:

While using an editable grid and store and Ext.grid.feature.Grouping to the grid. After that inserting new record to the grid causes problems.
Steps to reproduce the problem:

Use the "Grid Cell Editing" official example: In this example the grid doesn't have the "grouping feature" so when "Add Plant" is clicked everything works correctly. But if you add grouping feature you'll see that the newly inserted record is not rendered/working correctly. Also the when an old record is clicked, it doesn't get selected; the record above it gets selected.
The result that occurs instead:

You can also see from the attached picture that "data-recordindex" attributes of rows are not correct when grouping feature is used (for first record it is empty for the second one it is zero). And also the first record row doesn't have x-grid-row class.
Test Case:


.....................
initComponent: function() {
this.cellEditing = new Ext.grid.plugin.CellEditing({
clicksToEdit: 1
});


Ext.apply(this, {
width: 600,
height: 300,
plugins: [this.cellEditing],
features: [
Ext.create('Ext.grid.feature.Grouping', {
showSummaryRow: false,
hideGroupedHeader: true,
groupHeaderTpl: [
'{columnName}: {name}',
'<tpl if="rows.length">',
' ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})',
'</tpl>',
]
})
],
store: new Ext.data.Store({
// destroy the store if the grid is destroyed
...............................


Operating System:

Windows 8 64bit
HELPFUL INFORMATION

Screenshot or Video:

slemmon
5 Apr 2013, 8:05 AM
Thanks for the report! I have opened a bug in our bug tracker.