Hi. I have idProperty problem with store defined by viewModel, it's always equal 'id'
When I bind viewModel to the GridPanel, records in the store have idProperty equal 'id'.
Code:
Ext.define('App.model.Role', {
extend: 'Ext.data.Model',
idProperty: 'RoleID',
fields: [{
name: 'RoleID',
type: 'int'
},{
name: 'RoleName',
type: 'string'
}]
});
Code:
Ext.define('App.view.RoleModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.rolemodel',
stores: {
roles: {
model: 'App.model.Role',
autoLoad: true
}
}
});
When I bind viewModel to the GridPanel, records in the store have idProperty equal 'id'.
Can anybody help?
P.S.: Sorry for my english...
Aucun commentaire:
Enregistrer un commentaire