Greetings,
I'm trying to write a drag and drop routine. I have a split pane with a tree on one side and a WebGrid on the other. When the user chooses a node from the tree and drags it to the grid, I want the row which the user hovers over to activate or become selected.
As it stands now this does not happen. It requires an actual click to high-light the row.
Anyone have ideas here?
Thanks!
Have a look in the property grid under DisplayLayout for the client side events. You will find the MouseOutHandler, MouseOverHandler. I use those methods to handle hovering events in my grids so you should be able to work it out with that.
Terrific
While I have your interest, can you tell me how I would capture the 'row id' ? I will use the approach you directed but i'm wondering how I will be able to capture the row id using these methods.
For instance, I know there is something for cells:
function Over(gridNane, cellID, objectType) { var cell = igtbl_getCellById(cellID);
...
But how about the rows??
Ok, terrific
Thanks
In your Over function, it seems you have access to the cell...(cellID)
use the following to get the row
var cell = igtbl_getCellById(cellID);var row = cell.getRow();
if you also need the row id...although you've already got a reference to the row object with getRow();
// continuing on from abovevar rowId = row.Id;
that should be right for you to access the row when hovering...if you store the rowId, you will be able to tell when the mouse hovers over a new row instead of the cell in the same row, something like this:
//outside of hover functionvar lastHoverRowId;// in hover functionif (lastHoverRowID !== rowId) {
// the mouse has changed to a new row doStuff(); // store the new rowId lastHoverRowId = rowId; // store the value}