SunboX
2 Nov 2011, 9:39 AM
REQUIRED INFORMATION
Ext version tested:
Sencha Touch 2.0PR1
Browser versions tested against:
Safari 5.1 (Windows)
Description:
After sorting an Store later in the App, I want to remove the grouping of an List.
The result that was expected:
The group-sepparators disappear
The result that occurs instead:
Nothing happened
Test Case:
Ext.require([
'Ext.data.Store',
'Ext.List'
]);
Ext.define('TestModel', {
extend: 'Ext.data.Model',
fields: [
{name: 'name', type: 'string'},
{name: 'distance', type: 'string'}
]
});
Ext.setup({
onReady: function() {
var store = Ext.create('Ext.data.Store', {
model: 'TestModel',
data : [
{name: 'Ed', distance: '10 km'},
{name: 'Tommy', distance: '20 km'},
{name: 'Aaron', distance: '20 km'},
{name: 'Jamie', distance: '30 km'},
{name: 'André', distance: '45 km'}
],
getGroupString : function(record) {
return record.get('distance');
}
});
var list = Ext.create('Ext.List', {
fullscreen: true,
grouped: true,
title: 'Demo Time',
itemTpl: '{name} - {distance}',
store: store
});
// ... Do some stuff ... and finally remove grouping
list.setGrouped(false);
list.refresh();
}
});
greetings Sunny
Ext version tested:
Sencha Touch 2.0PR1
Browser versions tested against:
Safari 5.1 (Windows)
Description:
After sorting an Store later in the App, I want to remove the grouping of an List.
The result that was expected:
The group-sepparators disappear
The result that occurs instead:
Nothing happened
Test Case:
Ext.require([
'Ext.data.Store',
'Ext.List'
]);
Ext.define('TestModel', {
extend: 'Ext.data.Model',
fields: [
{name: 'name', type: 'string'},
{name: 'distance', type: 'string'}
]
});
Ext.setup({
onReady: function() {
var store = Ext.create('Ext.data.Store', {
model: 'TestModel',
data : [
{name: 'Ed', distance: '10 km'},
{name: 'Tommy', distance: '20 km'},
{name: 'Aaron', distance: '20 km'},
{name: 'Jamie', distance: '30 km'},
{name: 'André', distance: '45 km'}
],
getGroupString : function(record) {
return record.get('distance');
}
});
var list = Ext.create('Ext.List', {
fullscreen: true,
grouped: true,
title: 'Demo Time',
itemTpl: '{name} - {distance}',
store: store
});
// ... Do some stuff ... and finally remove grouping
list.setGrouped(false);
list.refresh();
}
});
greetings Sunny