Getting CellSelection object from mouse-selected cells

4 posts, 0 answers
  1. Atif
    Atif avatar
    1 posts
    Member since:
    Jan 2012

    Posted 03 Oct 2013 Link to this post

    Is it possible to get CellSelection object by selecting the cells using mouse. I need to store information (row and column index) of selected (using mouse) cells in another control.
    i.e something like CellSelection cs = this.worksheet.Cells.SelectedCells();
    Thanks.
  2. Anna
    Admin
    Anna avatar
    99 posts

    Posted 07 Oct 2013 Link to this post

    Hi,

    Thank you for your question!

    Do you need to get only the selections done by mouse or just any selection present at the worksheet?

    With the Selection object you will be able to get the selection of the worksheet no matter if it was made with code behind or by a mouse. You will need something similar to the following:
    Selection selection = this.RadSpreadsheet.ActiveWorksheetEditor.Selection;
    string selectionInfo = String.Empty;
    foreach (CellRange range in selection.SelectedRanges)
    {
        selectionInfo += range.FromIndex + " " + range.ToIndex;
        selectionInfo += Environment.NewLine;
    }

    The properties FromIndex and ToIndex are of type CellIndex from which you can easily get the information about the precise row and column index.

    I hope this answers your question. If you have further questions regarding this or any other matter, you can always come back to us.

    Regards,
    Anna
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Marc
    Marc avatar
    9 posts
    Member since:
    Sep 2016

    Posted 2 days and 16 hours ago Link to this post

    Is there a way to do this using Kendo Spreadsheet Widget and AngularJS/jQuery? Getting the selected cell and storing in a variable is extremely important for me!

     

    Thanks!

  5. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    114 posts

    Posted 15 hours ago Link to this post

    Hello Marc,

    The Kendo UI Spreadsheet has a lot of enhancements planned for R1 2017 and I am glad to let you know that a  select event is one of them:

    https://github.com/telerik/kendo-ui-core/issues/2409

    On a side note, this forum is for the RadSpreadsheet for WPF. Please post any further questions regarding the Kendo UI Spreadsheet in this forum instead:

    http://www.telerik.com/forums/kendo-ui/spreadsheet
    (or submit a support ticket)

    Sticking to this practice ensures that the best-trained colleagues for each product can see your question immediately and respond to you in the most time-efficient manner. 

    Thank you very much in advance.

    Kind Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Back to Top