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.

    <FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>function</FONT></FONT><FONT size=2> window.onload() {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>debugger</FONT></FONT><FONT size=2>;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> fpgrid = document.all(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"ctl00_cpActivity_fpActivityData"</FONT></FONT><FONT size=2>);


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (fpgrid != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>) {


    fpgrid.focus();


    document.fpActiveSpread = fpgrid;


    fpgrid.onActiveCellChanged = CellChanged;


    }

    <FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>function</FONT></FONT><FONT size=2> CellChanged() {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>debugger</FONT></FONT><FONT size=2>;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> fpgrid = document.getElementById(</FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"ctl00_cpActivity_fpActivityData"</FONT></FONT><FONT size=2>);


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (event.row != -1) {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> row = fpgrid.ActiveRow;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> col = fpgrid.ActiveCol;


    </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// __doPostBack(document.forms['ActMaint_prototype2.aspx'], 'act,' + row + ',' + col);

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>__doPostBack('ctl00_cpActivity_fpActivityData', 'Detail,' + row + ',' + col);

    </FONT></FONT><FONT size=2>

    }


    }

    </FONT></FONT>
  • 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:

     <font size="2"><font size="2">
    </font></font>

    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">function</font></font><font size="2"> CellChanged() {</font></font>


    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">debugger</font></font><font size="2">;</font></font>


    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">var</font></font><font size="2"> fpgrid = document.getElementById(</font><font color="#a31515" size="2"><font color="#a31515" size="2">"ctl00_cpActivity_fpActivityData"</font></font><font size="2">);</font></font>


    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> (event.row != -1) {</font></font>


    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">var</font></font><font size="2"> row = fpgrid.ActiveRow;</font></font>


    <font size="2"><font color="#0000ff" size="2"><font color="#0000ff" size="2">var</font></font><font size="2"> col = fpgrid.ActiveCol;</font></font>

    fpgrid.Callback("myButtonCommand") ;

    <font size="2"><font size="2">

    }


    }

     

    Thanks,

    </font></font>
Need extra support?

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

Learn More

Forum Channels