Grid filter and cookie

Hi,



Is it possible to save the filter that is set in the header of a grid in a cookie or load it using a specific variable?



Thanks,

MG

Grid has-not any built-in functionality for such purpose.

Hi there,
I just wanna come back to the original poster topic.
I finally got it working of storing the value of the filter into a cookie and reload it during startup. But I’m still facing a problem:
Is there a way of “setting” the value of the builtin “filterBy()” function of a selectbox (by ID or value)?
I mean, when I get the stored value of the last filter from the cookie and perform a filterBy(), the columns are filtered, but the “selectbox” is empty.


Thanks in advance.
ragsna

After XML loading the selectbox filled with values from related column.
There is no direct reference to SELECT element, so it can be reached only through DOM

var select=grid.hdr.rows[rowIndex].cells[columnIndex].getElementsByTagName(“SELECT”)[0];
select.value = "necessary one"

where rowIndex - index of row in header (1 based), cellIndex - index of column in header (0 based)


Hmm,
it looks like it is not working how it should. If I use:

var select=.mygrid.hdr.rows[2].cells[6].getElementsByTagName(“SELECT”)[0];
select.value = "123"

nothing happens in the selectbox.
It should show the 123 in the selectbox of column 6 and row 2.
Do I have to change the “SELECT” element, too?

And the other way around. Is it also possible in this way to readout the selected value of a selectbox by using DOM in this manner? If yes, how?

Thanks again.




Do I have to change the “SELECT” element, too?
#select_filter - SELECT
#text_filter - INPUT

>>Is it also possible in this way to readout the selected value of a selectbox by using DOM in this manner? If yes, how?
The “var select” calculated in the way described above is a select HTML object, so you can use its current value as select.value

Please check sample ( sent by email )

Unfortunately nothing arrived yet here.
Would you please be so kind to send it again (######@googlemail.com)?
Many thanks in advance!

ragsna

Email resent to provided email.