cut row from grid and insert new row on paste

1 posts, 0 answers
  1. Jake
    Jake avatar
    1 posts
    Member since:
    Mar 2013

    Posted 25 Mar 2013 Link to this post

    I've read over the documentation for the GridView and it covers copying to the clipboard and it sort of covers pasting  back.

    My requirements are as follows:
    The user can only select the entire row
    The user can copy the row's contents to the clipboard
    The user can cut the row's contents to the clipboard - this should cause the selected row to be deleted both in the grid and in the collection the grid is bound to.
    The user can paste a new row from the clipboard.  This should cause a new row to be interested in the grid before the currently selected row (push the selected row down).

    I have the copy to the clipboard working.  I'm not clear on how to catch the CTRL+X for cut, but I think the implementation should be pretty easy. 

    Pasting is less clear.  Can I just replace the e.Value with a new instance of my entity w/o blowing away the object that was there?  Or do I need to do the work behind the scene -
    1. create my new instance
    2. find the selected instance in my collection and insert it there
    3. change the selected instance to my new instance

    Any suggestions or directions would be greatly appreciated.
Back to Top