0
我如何更改groupField並重新加載網格。請幫幫我。由於更改組字段並重新加載網格Extjs 4
List.ascx
<td style="width: 20px"><input type="radio" name="grouping" value="AgencyName"/></td>
<td style="width: 50px"> AgencyName</td>
<td style="width: 20px"><input type="radio" name="grouping" value="HotelName" checked="checked"/></td>
<td style="width: 50px"> HotelName</td>
EntryStore.js
Ext.define('HotelWeb.HotelSite.js.EntryStore', {
extend: 'Ext.data.Store',
start: '',
requires: [
'HotelWeb.HotelSite.js.EntryModel',
'Ext.ux.grid.feature.*'
],
constructor: function (cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
storeId: 'EntryStore',
model: 'HotelWeb.HotelSite.js.EntryModel',
groupField: "AgencyName",
pageSize: 100,
proxy: {
url: 'Modules/Reports/EntryListGridHandler.ashx',
extraParams: {
f: '',
id: '',
seq: 0,
cols: '["CustomerTitle","CustomerName","CustomerNationality","CustomerPassport","CustomerBirthDate","CustomerAge","CustomerArrival","CustomerArrivalTime","CustomerDeparture","CustomerDepartureTime","ConfirmationStatusString","ReservationTypeString","ReservationStatusString","HotelName","AgencyName","VoucherNo","SellDate","CheckIn","CheckOut","Nights","RoomName","RoomTypeName","AccomName","RoomCount","SoldPrice","SoldCurrency","ExtraServicesInfo","Adults","Childs","Infants","Pax"]',
filters: '',
excl: '',
renew: true,
statusfilter: '',
refreshGridFilter: false,
}
EntryListGrid.js
Ext.create('HotelWeb.HotelSite.js.EntryStore');
grid = Ext.create('HotelWeb.HotelSite.js.EntryGrid');
operGrid = Ext.create('HotelWeb.HotelSite.js.OperationGrid', { hidden: true });
resultsPanel = Ext.create('Ext.panel.Panel', {
xtype: 'panel',
renderTo: 'entryListGrid',
layout: {
type: 'vbox',
align: 'stretch',
pack: 'start'
},
items: [
grid,
{
xtype: 'splitter',
id: 'splitter',
hidden: true
},
operGrid
]
});
如何我可以從無線輸入設置groupField。我將單選按鈕改爲
grid.store.groupField = value
但我必須重新網格