Livegrid+Filter

Originally Posted by mattb

Has anyone used Livegrid + the Grid Filter plugin? I'm trying this out and the grid and filters work as expected except when I apply a filter and then scroll the grid -- once the grid makes a request for new rows, it doesn't pass the filter to my server-side function so it ends up pulling new rows from an unfiltered dataset...

Any ideas on how to pass the filters through livegrid and back to the server?

thx

Matt

I have the same question. Has this be answered already and did I miss it?

I have the same question. Has this be answered already and did I miss it?

Hi,

a filter should be used server side. Here's how I pass additional parameters if I want to change the result set that should be rendered into the view:

First off, you need to tell the grid that the data in the store has changed: You can d this by calling the

Code:

reset()

method of the grid's view and by passing "true" as the argument:

Code:

this.grid.view.reset(true);

This forces the grid to request data from the server by totally resetting all properties - the view gets refreshed, then. Passing arguments to the server can be done by changing the attributes of the params-object that is used to communicate with the server. This is an example of sending additional parameters to the server - you must specify an event listener for the grids store's "beforeload"-event:

Please note that the "beforeload" event of the grid's store only fires "once": When requesting new data for buffering, the "*buffer" events will be triggered. However, arguments you have passed to the server using the above method will still exist in the params-obejct.

To reset the grid and to refresh the view , just call "reset(true)" and make sure you change the "beforeload"-listener accordingly.

I still don't fully understand what you are about to do, however I can give you a few hints, I guess.

1) If you take a look at the "processRows()" method of the grid view, you can see how grid rows get painted "selected". You could probably override this method and implement additional logic for highlighting your rows.

2) Use a field in a record which is used to represent a data row. Change the attribute of the record, for example "highlited", whenever you want to paint the record as highlighted (true/false)... then add you own renderer which is used to paint the row according to the "highlighted"-property of the record, just like you would do it in a normal grid.

I've just fixed another bug. It was the bug reported by me yesterday. So please try out this file and tell me your expirience with it.

As I tested it before It worked really fine and should fix the Ext 2.2 problems (at least the most important of it).

Like every time i fixed something you can reach the recent lines by searching for "fixed by nctag".

Hey nctag,

I just tried to reproduce your error, but had no success. I guess it's related to Ext 2.2 which I currently do not use yet. If you can reproduce this error with 2.1 and the latest Livegrid version out of the trunk, just tell me, otherwise I'll postpone this bug to the 0.3 release.

I just tried to reproduce your error, but had no success. I guess it's related to Ext 2.2 which I currently do not use yet. If you can reproduce this error with 2.1 and the latest Livegrid version out of the trunk, just tell me, otherwise I'll postpone this bug to the 0.3 release.

I confirm that it is a Ext 2.2 only bug. So don't care about it until the 0.3 release. I thought it would be clear that it's only for Ext 2.2. I am very sorry.

But I have got another question.

Is it possible to set the position to a specific record?
Let's say we have 10000 records in the livegrid. I now want to go per a button to the 5869. Record because this record is relevant in an other context. So I have to set the position to record 5869. It must be possible because you set the position also when a user uses the scroll bar. But I could not find the right way up to now. Do you have an example how to realize it correctly?