Problem with Static cells + ComboBox and ClipboardCut

Posted by: maverick123 on 8 September 2017, 2:43 pm EST

  • Posted 8 September 2017, 2:43 pm EST

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Hi,<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">I am upgrading Farpoint Spread 7.0.55 (COM) to .Net version ver. 5 (Spread for Windows Form). </SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"></SPAN> 

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">A) </SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">I have found a behavioral difference while handling Static and locked cells while using </SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;">ClipboardCut()</SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">.<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">The grid I am working with have column headers and cells of first row are static.<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">If whole column is selected by clicking column header and perform </SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;">ClipboardCut</SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"> then Farpoint 7 and .Net versions behave differently.<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Farpoint 7 Cut (delete) entire data in the particular column other than static cells data. But .Net version of Farpoint have not cut any data from the grid. Same applied for the locked cells.<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">I want to replicate the behavior of Farpoint 7 in its .Net version. i.e. ClipboadCut should cut data of entire column other than static cells.<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Is my observation is correct? If yes then how I can achieve the desired functionality through .Net version of Farpoint?<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p> </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p>B) </o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p>Similarly i have noticed that if cell type is Combo Box and we perform </o:p></SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;">ClipboardCut() on it,</SPAN><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"> Farpoint7 and .Net version behaves differently.i.e.</SPAN></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"> </SPAN></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">In Farpoint 7 value get deleted and display value is empty but combo box and its items still there. But in .Net version combo box itself get deleted. One cannot reset the value. I cannot lock or static the combo box because in this way combo selection will not be possible.</SPAN></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"> </SPAN></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Is there any way in .Net version that <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;">ClipboardCut() <FONT face=verdana,geneva>ignores combo box OR at atleast do as Farpoint 7 was doing? i.e. deleting only value, not combo box.</FONT></SPAN></SPAN></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><o:p><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;"><SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Courier New';mso-no-proof:yes;"><FONT face=Verdana></FONT></SPAN></SPAN></o:p></SPAN> 

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Thanks and Regards,<o:p></o:p></SPAN>

    <SPAN style="FONT-SIZE:10pt;FONT-FAMILY:Verdana;">Maverick<o:p></o:p></SPAN>

    <o:p><FONT face="Times New Roman" size=3> </FONT></o:p>

  • Replied 8 September 2017, 2:43 pm EST


    A. I am able to replicate this issue. I have reported this as a bug as I see that the data gets transfered to clipboard on ClipbaordCut(Ctrl+X) however the cells are still filled. For your case we can think of a work around where  we can capture the Ctrl+X key event and apply a custom clip board action. In this event we may set the selection pro grammatically and call ClipBoardCut() method for this selection.Let me know if you need a sample to demonstrate this.

    Bug number for this case is <span class="dlgtitle">#99922963</span><span class="lockmsg"> </span>

    B. If you are using key board short cut , then it is an intended behavior. To prevent this you may<font> create your own InputMap to cut just the data by assing the SpreadAction ClipBoardCutDataOnly.</font>

    <font>for example:</font>

    <span style="font-size:10pt;font-family:'Courier New';"><span><font face="Lucida Console, Courier" size="2">    </font></span><span style="color:blue;"><font face="Lucida Console, Courier" size="2">Dim</font></span><font face="Lucida Console, Courier" size="2"> im <span style="color:blue;">As</span> FarPoint.Win.Spread.InputMap</font></span>

    <span style="font-size:10pt;font-family:'Courier New';"><span><font face="Lucida Console, Courier" size="2">    </font></span><font face="Lucida Console, Courier" size="2">im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)</font></span>

    <span style="font-size:10pt;font-family:'Courier New';"><span><font face="Lucida Console, Courier" size="2">    </font></span><font face="Lucida Console, Courier" size="2">im.Put(<span style="color:blue;">New</span> FarPoint.Win.Spread.Keystroke(Keys.X, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardCutDataOnly)</font></span>






  • Replied 8 September 2017, 2:43 pm EST


    Thanks for reply,

    Infact i am using ClipBoardCut() method on the click of popup menu i.e.

    <FONT color=#0000ff><FONT color=#0000ff>Dim</FONT></FONT> lObj_ActiveControl <FONT color=#0000ff><FONT color=#0000ff>As</FONT></FONT> FpSpread

    lObj_ActiveControl = Form.ActiveForm.ActiveControl


    So i think capturing Ctrl+X or Input Map will not work for me here.

    Anyother workaround?

    I think this can also be done....

    <FONT size=2>



     Thanks and Regards,


  • Replied 8 September 2017, 2:43 pm EST


    <font size="2">

    lObj_ActiveControl.ActiveSheet.ClipboardCut(FarPoint.Win.Spread.ClipboardCopyOptions.Values) should work in case you calling the ClipBoardCut( ) method some where in your code.





Need extra support?

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

Learn More

Forum Channels