I am exploring dojo grid, and could not find a good example of how to handle navigation by clicking on the row.
There is a simple grid example here
How to extend the code with the following requirement
- handle doubleclick event on row items
- read the identifier and extract the value corresponding to the selected row ( 12 for first row)
- redirect to {current domain}/view/{identifier} (like www.example.com/view/12)
any help would be a great time saver...
thanks.
EDIT: added javascript tag so that more user may see this post (only 9 so far with dojo alone)
I had to solve problems 1 and 2 above. You can use dojo.connect to connect the grid to the onRowClick event. For example, if you have a grid of the form:
You can then call in JavaScript:
clickMethod can then access the data from the row as follows:
I imagine you can do a location.href or similar after that.