excel like functionality where the total of the selected cells is displayed at the bottom of the grid

Posted by: bamldeveloper on 8 September 2017, 2:21 pm EST

  • Posted 8 September 2017, 2:21 pm EST

    I need to add excel like functionality where the total of the selected cells is displayed at the bottom of the grid.
    e.g.  If I select a range of cells containing 1, 2, 3 and 4 and then a single cell containing 5 as well using the control key it should show a total of 15.


    Is there any inbuilt feature for this or must I write something myself?  We are using Spread v5, C# 2.0.


    Thanks

  • Replied 8 September 2017, 2:21 pm EST

    Hello,


    There is no inbuilt feature to achieve the same. However, you can try adding to the total wenever we press controlKey and mouse left button and then show that total in Spread footer on click of a button.


    Please have a look at the attached sample to achieve the similar behavior.


    Thanks.


    2010/06/TotalSumOfSelectedCells.zip
  • Replied 8 September 2017, 2:21 pm EST

    Thanks for the prompt response and sample code. 


    I decided to work off the selection changed event, so that the user can use the keyboard as well as the mouse.

Need extra support?

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

Learn More

Forum Channels