Altering selection display depending upon where user clicks

Posted by: j2associates on 8 September 2017, 1:05 pm EST

  • Posted 8 September 2017, 1:05 pm EST

    Hello all,


    We have a read only validation spread (OperationMode = ReadOnly) with selection unit set to Cell. When the user clicks inside the data area, I want the selection unit to be cell because we have a button that they click to open a form to fix invalid data.


    But if they click in the RowHeader or ColulmnHeader I want the selection to be multi select so they can select one or more, contiguous or non contiguous rows for copying into Excel.


    Lastly, if they click in the upper left hand corner I want to select the entire spread for copying. Any suggestions on how best to implement these different situations?

  • Replied 8 September 2017, 1:05 pm EST

    j2 -

    For the first scenario this should work...

    FpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.ReadOnly
    FpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Cell
    FpSpread1.ActiveSheet.SelectionPolicy = FarPoint.Win.Spread.Model.SelectionPolicy.Single

    For the second you will have to use the CellClick event and check if you are clicking in a header and if so change the SelectionUnit and SelectionPolicy.

    The third issue should always happen regardless of what you have set up.
Need extra support?

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

Learn More

Forum Channels