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

    Hi,


     


    I am upgrading Farpoint Spread 7.0.55 (COM) to .Net version ver. 5 (Spread for Windows Form).


     


    A) 


    I have found a behavioral difference while handling Static and locked cells while using ClipboardCut().


     


    The grid I am working with have column headers and cells of first row are static.


    If whole column is selected by clicking column header and perform ClipboardCut then Farpoint 7 and .Net versions behave differently.


     


    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.


     


    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.


     


    Is my observation is correct? If yes then how I can achieve the desired functionality through .Net version of Farpoint?


     


    B) 


    Similarly i have noticed that if cell type is Combo Box and we perform ClipboardCut() on it, Farpoint7 and .Net version behaves differently.i.e.


     


    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.


     


    Is there any way in .Net version that ClipboardCut() ignores combo box OR at atleast do as Farpoint 7 was doing? i.e. deleting only value, not combo box.


     


    Thanks and Regards,


    Maverick


     

  • Replied 8 September 2017, 2:43 pm EST

    Hello,

    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 #99922963 

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

    for example:

        Dim im As FarPoint.Win.Spread.InputMap

        im = FpSpread1.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenFocused)

        im.Put(New FarPoint.Win.Spread.Keystroke(Keys.X, Keys.Control), FarPoint.Win.Spread.SpreadActions.ClipboardCutDataOnly)

     

     

    Thanks,

     

     

  • Replied 8 September 2017, 2:43 pm EST

    DeepakSharma,


    Thanks for reply,


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


    Dim lObj_ActiveControl As FpSpread


    lObj_ActiveControl = Form.ActiveForm.ActiveControl


    lObj_ActiveControl.ActiveSheet.ClipboardCut()


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


    Anyother workaround?


    I think this can also be done....


    lObj_ActiveControl.ActiveSheet.ClipboardCut(FarPoint.Win.Spread.ClipboardCopyOptions.Values)


     Thanks and Regards,


    Maverick

  • Replied 8 September 2017, 2:43 pm EST

    Hello,


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

     

    Thanks,

     

Need extra support?

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

Learn More

Forum Channels