ExtJs5 に 3 列のグリッドがあります。ヘッダーの下でグリッドの行を開始する前に、テキストフィールドのようなコンポーネントを追加したいと考えています。実際には、テキストフィールドの値に基づいてデータをフィルタリングしたいと考えています。
注 - ヘッダーにテキストフィールドを追加したくありません。グリッドのヘッダーの下に欲しい。
ここにグリッドコーディングがあります -
Ext.onReady(function () {
var studentStore = new Ext.data.JsonStore({
autoLoad: true,
pageSize: 10,
fields: ['Name', 'Age', 'Fee'],
data: {
items: [
{ "Name": 'Puneet', "Age": '25', "Fee": '1000' },
{ "Name": 'Ankit', "Age": '23', "Fee": '2000' },
{ "Name": 'Rahul', "Age": '24', "Fee": '3000' }
]
},
proxy: {
type: 'memory',
reader: {
type: 'json',
rootProperty: 'items'
}
}
});
var window = new Ext.Window({
id: 'grdWindow',
width: 400,
title: 'Grid Samples',
items: [
{
xtype: 'panel',
layout: 'fit',
renderTo: Ext.getBody(),
items: [
{
xtype: 'grid',
id: 'grdSample',
height: 300,
store: studentStore,
columns: [
{
header: 'Name',
dataIndex: 'Name'
},
{
header: 'Age',
dataIndex: 'Age'
},
{
header: 'Fee',
dataIndex: 'Fee'
}
]
}
]
}
]
}).show();
});
ここに画像があります-上記のコードの結果-
テキストボックスが必要な場所にマークを付けました-
tbar、bbar、dockedItemsなどを使用するなど、この問題のいくつかの解決策を得ましたが、希望どおりに機能しませんでした。