Breaking point not firing with in button command event

Posted by: ci on 10 September 2017, 10:57 am EST

  • Posted 10 September 2017, 10:57 am EST

    Hi,


    I am using farpoint spread to populate data, i added button command event in Oninit function and i wrote below script in javascript section. Break point going to cellchanged event but its not digging into button command event code...please reply me on this, why its not going into button command event.


    function window.onload() {


    debugger;


    var fpgrid = document.all("ctl00_cpActivity_fpActivityData");


    if (fpgrid != null) {


    fpgrid.focus();


    document.fpActiveSpread = fpgrid;


    fpgrid.onActiveCellChanged = CellChanged;


    }


    function CellChanged() {


    debugger;


    var fpgrid = document.getElementById("ctl00_cpActivity_fpActivityData");


    if (event.row != -1) {


    var row = fpgrid.ActiveRow;


    var col = fpgrid.ActiveCol;


    // __doPostBack(document.forms['ActMaint_prototype2.aspx'], 'act,' + row + ',' + col);


    __doPostBack('ctl00_cpActivity_fpActivityData', 'Detail,' + row + ',' + col);


    }


    }

  • Replied 10 September 2017, 10:57 am EST

    Hello,

    To raise button command event server side you need to make call back with some command name from client side: For example:

     

    function CellChanged() {


    debugger;


    var fpgrid = document.getElementById("ctl00_cpActivity_fpActivityData");


    if (event.row != -1) {


    var row = fpgrid.ActiveRow;


    var col = fpgrid.ActiveCol;

    fpgrid.Callback("myButtonCommand") ;

    }


    }

     

    Thanks,

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels