Programmatically copy radgridview into clipboard

3 posts, 0 answers
  1. Jia
    Jia avatar
    3 posts
    Member since:
    Jan 2014

    Posted 04 Aug 2015 Link to this post


    My scenario is like this,

    I'm trying to do this in a button click event. Focus on the radgridview, select all rows. I know that I could do it by press ctrl+c to copy it. Can I somehow do it programmatically in the button click, so that i can make the button 'copy all' instead of 'select all'. It's kinda unnecessary. it's a customer requirement...


    Private Sub btnDtlCopy_Click(sender As Object, e As RoutedEventArgs)
    End Sub​


     Any idea is highly appreciated.

    thank you

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 05 Aug 2015 Link to this post


    You can execute RadGridViewCommand. For more information, please check the documentation on Commands Overview.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Jia
    Jia avatar
    3 posts
    Member since:
    Jan 2014

    Posted 05 Aug 2015 in reply to Dimitrina Link to this post

    Thank you, problem solved.


    Dim copyCommand = TryCast(RadGridViewCommands.Copy, RoutedUICommand)
    copyCommand.Execute(Nothing, gvExportDtl)​

Back to Top