PDA

View Full Version : How filter the data in table



look67
29 Aug 2008, 7:28 AM
Hi all,

I'am just started on the GXT library, and I have a problem to develop my project.

So, I have a table with data loaded by a BasePagingLoader that use an HTTPProxy and a JSONReader.
It works, so now, I want to filter the data.

I have a form with a ComboBox, a SelectionChangedListener, it works too.

But I have not found how to change the parameters of the request. I have tried to use a LoadConfig but without example, I have not managed to do it.

So if anybody can provide a example to apply a filter...

Thx
Look

sachinsurvase
26 Sep 2008, 2:26 AM
StoreFilterField<YourObject> filterField = new StoreFilterField< YourObject >() {
protected boolean doSelect(Store store1, YourObject parent, YourObject record, String property, String filter) {
String yourFieldName = record.getYourFieldName();
if (yourFieldName.startsWith(filter)) {
return true;
}
return false;
}

};

filterField.bind(store);

elaheurte
8 Dec 2008, 3:03 AM
Hello,

I want create a search form. I use StoreFilterField, is the better method ? If not help me.

I want just filter my store on buttun click, how i do that ?

When i reset a StoreFilterField, the store is not filter with other.

Thank you

fother
8 Dec 2008, 5:52 AM
you need create your BasePagingLoadConfig.. and overwrite the method load(Config config), guetting the attributes.. and call the method that would be return your data base list.