3.2.0

How to *NOT* select row

Hi All,

I have folowing problem and i am just going mad with that:
I have one cell in the grid containg link - I would like to not select row when click on it (but select when clik anywhere else on the row) - I have tried cancelBubble and preventPropagation stuff, also i have set setSelectionMode to "none" and tried to select/unselect rows via script (this time ething worked fine but when i selected row, grid scrolled to first row :(().

Can anybody give me a hint what should i to with that?

Thanks in advance
boss
October 25,
The row is selected with onRowMouseDown event, so ideally you should catch onCellMouseDown and cancel event propagation, which unfortunately is not possible with the current code. Here is a workaround (not very elegant, but I guess it does what you need) -

var cancelRowSelect;

obj.onCellMouseDown = function(event, col, row){
    if (col==2){
        cancelRowSelect = true;
    }
}

obj.onRowMouseDown = function(event, col, row){
    if (cancelRowSelect){
        cancelRowSelect = false;
        return true;
    }
}
Alex (ActiveWidgets)
October 25,
Hi Alex,

Yes - it is exacly what I need:)
Thank you very much!:)

boss
October 26,

This topic is archived.

See also:


Back to support forum