Use ajax.reload() and pass in variables
Use ajax.reload() and pass in variables
jimkiely
Posts: 9Questions: 10Answers: 0
Is there a way to use the ajax.reload() and pass in new variables? The variables will be set from dropdownlist outside of the grid.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Not directly, but
ajax.data
can be given as a function which will be executed when you callajax.reload()
so you could pass parameters in from the function.Allan
Allan, I want to reload the table and pass in a new variable value (appYear: "2001"). What is the best way to do this?
Probably to use the
ajax.data
option as I mentioned. You would need to do it in a function so it is evaluated on each request. There are examples in theajax.data
documentation.Allan
Any good examples of how to do a reload and pass variables?
The examples on the
ajax.data
page should cover this do they not?and then just call
ajax.reload()
. In that case it is getting the variable front he DOM, but you can get it from anywhere you want - a function, another variable, etc.Allan
Thanks Allan.