Is there a simple way to add selected cells

Like Excel, I want to have a status bar that shows accumulates the total of any cells with numbers selected. Is there a sample or suggestion how to do this? Thanks

7 Replies

AD Administrator Syncfusion Team January 5, 2006 03:05 PM UTC

Hi, You can use SelectionsChanged event and the formula engine to show the accumulate total of any selected cell in a status bar. Here is a sample. Regards, Calvin.

Forum_39348.zip


VA va January 6, 2006 04:10 AM UTC

Thank you.


VA va January 6, 2006 04:10 AM UTC

Thank you.


VA va January 6, 2006 04:51 AM UTC

Actually, this has a problems. First, if you click on the cells with ctrl + clcik and have non-contigous selection, it doesn''t work. I tried getSelectedCells but it returns a string like "A3:A6;A9" which can''t be used by the formula engine. How do I have the GridRangeInfoList parsed properly so I can either manually count them ot have the engine do it?


AD Administrator Syncfusion Team January 6, 2006 11:17 AM UTC

Hi, Here is a sample which parses the GridRangeInfoList and show the accumulate total of any selected cell in a status bar. Regards, Calvin.

Forum_393480.zip


VA va January 6, 2006 06:02 PM UTC

Thanks. That got me started. BTW, One interesting bug - the grid doesn''t distinguish between what is being selected versus unselected veesus selected more than once. So if you click on one cell, then crtl+click click anotehr then crtl+click thr original cell, it will add them to the total more than once.


AD Administrator Syncfusion Team January 10, 2006 04:58 PM UTC

Hi, Sorry for the inconvenient caused and the delay in replying. Here is an workaround which uses a custom MouseController to deselect a cell. Regards, Calvin.

Forum_39348_WA4.zip

Loader.
Up arrow icon