PDA

View Full Version : Search Field in the Grid View



sthanar
6 Aug 2013, 3:02 AM
Hi,

I have paging grid rendered in the panel. want to have search option for the grid. so i have added a text field, and a button in tbar. On the button click i call applyfilter(searchFiled.getValue()) method.

function applyfilter(e){
var filters = {};
filters["start"] = 0;
filters["limit"] = 25;
filters["query"] = "\'" + e + "\'";

this.store.load({
params: filters
});
}

It does not working. Suggest me please.

i am using ext js 3.2.1

wm003
7 Aug 2013, 4:16 AM
Take a look at how the common Gridfilters are implemented

http://dev.sencha.com/deploy/ext-3.4.0/examples/grid-filtering/grid-filter-local.html

sthanar
7 Aug 2013, 4:32 AM
empty grid is loading in the given url.

problem:
grid has loaded using JSON store. i am using paging grid. so each page have 25 records. Now my store variable has 25 records which comes from the server. i wanted to search using one of the filed name among the 25 records. if matches found, that particular record only has to reloaded in my grid.

i stuck in this almost two three days. tried lot of samples. Nothing turned out.

Help me out of this.