Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Selecting a range of cells

Does the SRP EditTable have the ability to select any range of cells and copy and paste them, similar to the way you can on an Excel spreadsheet?

Thanks,
Dan

Comments

  • Hi Dan,

    Alas, no. It is a feature, among others, that we would like to implement but it just has not risen to prominence on our list.

    Are you looking to emulate the ability to select any range of cells, or are you looking to do something more specific, such as multiple rows? The latter can be simulated without too much effort.

    With regard to copy/paste, keep in mind that the target control you are pasting into will have to know how to handle the format. Were you considering just copying and pasting within SRP EditTable controls? If so then you do not have to do much work. Otherwise, you would need to roll out your own feature and format the data during the copy operation so that the target will accept it easily.
  • I was mostly thinking of using it to copy from one table to another, and I'm sure at some point I would want it to have the ability to paste to MS Excel and/or MS Word. I love some of the features that the SRP EditTable has to make it behave the way that I would want, which is hard to do in the standard OI Edit Table. Little things like the CellEditMode property help to make the user experience be much more streamlined.
  • Dan,

    Depending on how fancy you want the UI to behave I am confident you can make something work.

    You could trap the OnClick event and check to see if the Ctrl or Shift keys were presed. If so, that would be a signal that the user wants to select multiple cell or rows. Then you should use the CellColors property to identify the area of the SRP EditTable that is "selected".

    Then you would just use your own code when the user attempts to copy and get the relevant CellText properties.

    Hopefully that gives you some ideas to work with.
Sign In or Register to comment.