Skip to main content
Inspiring
March 17, 2008
Answered

CFGrid double click event handler

  • March 17, 2008
  • 1 reply
  • 1380 views
Is there anybody can send an example of how to handle double click event with CFGrid type html? Thank You In Advance.
    This topic has been closed for replies.
    Correct answer Shirak76
    I guess I found the answer by myself.
    <script>
    function init()
    {
    grid = ColdFusion.Grid.getGridObject("MainGrid");
    gb = grid.getColumnModel();
    grid.reconfigure(grid.getDataSource(),gb);

    grid.addListener("rowdblclick", function(grid, rowIndex, e)
    {

    var record = grid.getDataSource().getAt(rowIndex); // Get the Record
    var Mykey = record.data.MyKEY;

    ColdFusion.Window.create('windiow1','My Window Title','win_mywindow.cfm?URLkey='+MyKEY,{height:500,width:620,modal:false,closable:true,draggable:true,resizable:false,center:false,initshow:true});

    e.stopEvent();
    //console.log(record);
    });

    }
    </script>

    1 reply

    Shirak76AuthorCorrect answer
    Inspiring
    May 19, 2008
    I guess I found the answer by myself.
    <script>
    function init()
    {
    grid = ColdFusion.Grid.getGridObject("MainGrid");
    gb = grid.getColumnModel();
    grid.reconfigure(grid.getDataSource(),gb);

    grid.addListener("rowdblclick", function(grid, rowIndex, e)
    {

    var record = grid.getDataSource().getAt(rowIndex); // Get the Record
    var Mykey = record.data.MyKEY;

    ColdFusion.Window.create('windiow1','My Window Title','win_mywindow.cfm?URLkey='+MyKEY,{height:500,width:620,modal:false,closable:true,draggable:true,resizable:false,center:false,initshow:true});

    e.stopEvent();
    //console.log(record);
    });

    }
    </script>