input string was not in correct format - when drap and drop columns to move from one position to other

Posted by: tejashvini on 8 September 2017, 1:59 pm EST

  • Posted 8 September 2017, 1:59 pm EST

    <FONT color=#0000ff><FONT color=#0000ff>

    <FONT face=arial,helvetica,sans-serif>private</FONT></FONT></FONT><FONT face=arial,helvetica,sans-serif> <FONT color=#0000ff><FONT color=#0000ff>void</FONT></FONT> fpSpread1_LeaveCell(<FONT color=#0000ff><FONT color=#0000ff>object</FONT></FONT> sender, FarPoint.Win.Spread.<FONT color=#008080><FONT color=#008080>LeaveCellEventArgs</FONT></FONT> e)</FONT>


    <FONT face=arial,helvetica,sans-serif>{</FONT>


    <FONT color=#0000ff><FONT face=arial,helvetica,sans-serif color=#0000ff>int</FONT></FONT><FONT face=arial,helvetica,sans-serif> Col = e.Column;</FONT>


    <FONT face=arial,helvetica,sans-serif><FONT color=#0000ff><FONT color=#0000ff>int</FONT></FONT> Row = e.Row;

    </FONT>

    <FONT face=arial,helvetica,sans-serif><FONT color=#0000ff><FONT color=#0000ff>if</FONT></FONT> (fpSpread1.Sheets[0].GetText(Row,Col) != <FONT color=#800000><FONT color=#800000>""</FONT></FONT></FONT><FONT face=arial,helvetica,sans-serif>)</FONT>


    <FONT face=arial,helvetica,sans-serif>fpSpread1.Sheets[0].SetValue(Row,Col,fpSpread1.Sheets[0].GetText(Row,Col).ToUpper(),</FONT><FONT color=#0000ff><FONT face=arial,helvetica,sans-serif color=#0000ff>false</FONT></FONT><FONT face=arial,helvetica,sans-serif>);</FONT>


    <FONT face=arial,helvetica,sans-serif>}</FONT>


     The line in bold is throwing the exception.

  • Replied 8 September 2017, 1:59 pm EST

    Hello,

    I tested the above snippet on a bound spread with AllowDragDrop set to True and did not get any exception on dragging the columns or range of cells in response of your above code in the LeaveCell event.Any additional steps I need to perform to replicate the issue at my side.

    Thanks

Need extra support?

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

Learn More

Forum Channels