newusername
21 Jul 2014, 4:05 AM
HI ,
I have list filter applied on one of the column and if store has no value for that column then rendering of filter is not so good. I want to remove that rendering how can I do that ?
Please see the attached screen shot of rendering of filter if that column don't have any data to display
I don't want to show either display filter nor that part after you mouse hover on "Filter" label.
49715
Following is the code snippet.
Ext.onReady(function() {
// Define data model and store (with test data) for grid.
Ext.define("Employee", {
extend: "Ext.data.Model",
fields: [ "name", "age", "empid" ]
});
var Restaurants = Ext.create("Ext.data.Store", {
model : "Employee",
data : [
{name : "emp1" , age:15},
{ name : "emp2", age : 20}
]
});
var filters = {
ftype : "filters",
local : true,
autoReload : false
};
// Now build the UI.
new Ext.Viewport({
layout : "fit",
items : [
{ xtype : "grid", store : Restaurants, features : [ filters ],
columns : [
{ width : 150, text : "Name", dataIndex : "name",
filter : { type : "string" }
},
{ width : 100, text : "Age", dataIndex : "age" },
{ width : 50, text : "empId", dataIndex : "empid",
filter : { type : "list"}
}
]
}
]
});
});
I have list filter applied on one of the column and if store has no value for that column then rendering of filter is not so good. I want to remove that rendering how can I do that ?
Please see the attached screen shot of rendering of filter if that column don't have any data to display
I don't want to show either display filter nor that part after you mouse hover on "Filter" label.
49715
Following is the code snippet.
Ext.onReady(function() {
// Define data model and store (with test data) for grid.
Ext.define("Employee", {
extend: "Ext.data.Model",
fields: [ "name", "age", "empid" ]
});
var Restaurants = Ext.create("Ext.data.Store", {
model : "Employee",
data : [
{name : "emp1" , age:15},
{ name : "emp2", age : 20}
]
});
var filters = {
ftype : "filters",
local : true,
autoReload : false
};
// Now build the UI.
new Ext.Viewport({
layout : "fit",
items : [
{ xtype : "grid", store : Restaurants, features : [ filters ],
columns : [
{ width : 150, text : "Name", dataIndex : "name",
filter : { type : "string" }
},
{ width : 100, text : "Age", dataIndex : "age" },
{ width : 50, text : "empId", dataIndex : "empid",
filter : { type : "list"}
}
]
}
]
});
});