I'm relatively new to dojo and have seen how datagrid offers a dynamic filtering capability that reduces the visible rows based on what you type into a filter text input. I have not found any examples of how to do it with the dgrid. If it can be done, please provide an example or point me to a resource that offers a tutorial or example. Thanks!
相关问题
- Simple Dojo i18n implementation
- Dgrid set focus on cell
- Dgrid set focus on cell
- Cannot create dijits via dojo.NodeList.instantiate
- Firefox does not honor Content-type header in xhrP
相关文章
- Constrain position of Dojo FloatingPane
- How to get the “value” of a FilteringSelect <se
- Difference between registry.byId and dom.byId in d
- The load sequence difference between template and
- Dijit TabContainer Events - onFocus
- Dojo populate combo box widget dynamically
- Dojox.grid.DataGrid - in a widget - only renders o
- Is there any javascript library to capture mouse/k
I know this isn't the answer to the question asked, and the answer provided is masterful and we use it quite a bit.
However, this functionality doesn't seem to work well at all if you're using a TreeGrid (columns with the "dgrid/tree" plugin). I've written some code to simulate the same behavior as the accepted answer with a tree grid. It's basically just looping through the items in the store and hiding any row elements that don't match whatever condition you set forth. Thought I would share it in case it helps anybody. It's rather ugly and I'm sure it can be improved upon, but it works.
It basically uses the same concept as phusick's answer. You need to watch a value on a TextBox, but instead of refreshing the grid you have it call a function:
And here's the function:
Yes, it is possible. Use
dgrid/OnDemandGrid
and definequery
function that will returntrue
orfalse
based on your logic for each row indojo/store
powering the grid.I prepared an example to play with at jsFiddle: http://jsfiddle.net/phusick/7gnFd/, so I do not have to explain too much:
The Query Function:
The Grid: