Process selected cells

I'm wanting to be able to select multiple cells on a row but not next to each other using the ctrl key. This works fine but I'm not sure how to then access the selected cells in code.

When using the GetLastSelection() in the MouseUp event, it only has access to the last cell selected.

Hi,

Well, I am afraid, obtaining the non continuous ranges of selected cells feature is not available. I have logged your feature request into our issue tracking system with an issue id: CELLSNET-16008. We will inform your if there is any update about it.

Thank you.

Thanks for the quick reply. Is there a way to turn off the non-continous selection?

If not, could that be added fairly quickly until the way to access them is available?

Hi,

We have implemented a method named “GetAllSelectedRanges” to get all selected CellRange objects returned by an ArrayList object in Aspose.Cells.GridDesktop v2.1.0.2004(attached). Please try these lines of code for your need accordingly:

ArrayList ar = gridDesktop1.Worksheets[0].GetAllSelectedRanges();

foreach (CellRange range in ar)

{

Console.WriteLine(range.Address);

<span style=“font-size: 10pt; font-family: “Courier New”;” lang=“EN-US”>
}


Thank you.