This is a migrated thread and some comments may be shown as answers.

Cell Double Click

1 Answer 100 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 19 Feb 2013, 10:31 AM
Hi,

Are there any way to get the Cell Double Click event on client-side ?
I need to get which cell did the user click on the grid.

Regards,
Daniel

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 20 Feb 2013, 04:33 AM
Hi,

Please take a look into the following  script I tried to attach cell double double click event in javascript.

Javascript:
<script type="text/javascript">
    var Cell;
    function RowCreated(sender, eventArgs) {
        var dataItem = eventArgs.get_gridDataItem();
        //traverse the cells in the created client row object and attach dblclick handler for each of them
        for (var i = 0; i < dataItem.get_element().cells.length; i++) {
            var cell = dataItem.get_element().cells[i];
            if (cell) {
                $addHandler(cell, "dblclick", Function.createDelegate(cell, ShowColumnEditor));
            }
        }
    }
    function ShowColumnEditor() {
        Cell = this;
        alert(Cell.innerHTML);
    }
</script>

Thanks,
Shinu.
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or