dimanche 23 mars 2014

extJs - populate grid panel with array of strings


Vote count:

0




I receive an array of strings from the server. How can I populate my grid panel if the data is not in key-value format?


Here is the response: {"result":true,"data":["dep1","dep2","dep3"],"totalCount":3}


Here is my grid panel



xtype: 'gridpanel',
flex: 1,
itemId: 'departmentsGridPanel',
title: '',
store: new Ext.data.ArrayStore({
autoLoad: true,
fields: [
'department'
],
proxy: {
type: 'ajax',
url: 'FilteringDataServlet?filterColumn=avdeling',
reader: {
type: 'json',
root: 'data'
}
}
}),
columns: [{
text: 'Avdeling',
flex: 1,
dataIndex: 'department'
}],


asked 26 secs ago

Oleg

964





Aucun commentaire:

Enregistrer un commentaire