by
allistar >> Tue, 4 Feb 2003 5:34:14 GMT
Hi Dave,
It is possible to do this (we do exactly this in our product). It's a shame there isn't a parameter in Jade that allows this to be done automatically.
Rather than doing it on the table.click event code it onto the table.mouseDown event. From there you can tell if cntrl or shift is held down. Your logic needs to remember what the first row clicked on was (so that you can adequately select mutliple rows when the "shift" button is held down.
What we do is store a collection of currently selected rows (or in our case the objects in the rows) which prevents you form needing to keep asking the table whether a row is currently selected or not, and it simplifies selection somewhat.
Hope this helps,
Allistar.
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst
allistar@silvermoon.co.nz
Auckland, NEW ZEALAND
Silvermoon Software
Specialising in JADE development and consulting
Visit us at:
http://www.silvermoon.co.nz ------------------------------------------------------------------