Implement "copy down" feature - referencing Row(s) of SelectedCells

6 posts, 2 answers
  1. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 07 Oct Link to this post

    Hi,

    Could you please advise how to reference the row(s) of the SelectedCells?

    For example, would like to implement a "copy down/fill handler" (as in Excel) using a ContextMenu on the gridview. For each SelectedCell, we would like to copy the cell contents of the top selected row down to each row of the SelectedCells using MVVM. Please find a sample of the XAML attached.

            <telerik:RadGridView Name="dtgMyData" 
                                 ItemsSource="{Binding Path=MyData}" 
                                 AutoGenerateColumns="False" 
                                 RowIndicatorVisibility="Visible"
                                 HorizontalAlignment="Stretch"
                                 SelectionMode="Extended"
                                 SelectionUnit="Mixed">

    ...

    <telerik:RadMenuItem Header="Copy Values Down" Command="{Binding DataContext.CopyValuesDownCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadContextMenu}}}" CommandParameter="{Binding Path=UIElement, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=telerik:RadContextMenu}}" />
                        </telerik:RadContextMenu.Items>
                    </telerik:RadContextMenu>
                </telerik:RadContextMenu.ContextMenu>

    ...columns...

    </telerik:RadGridView>

     

    Kindly advise.

    Thanks

  2. Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 12 Oct Link to this post

    Hi Abhinav,

    For your convenience, I prepared an example to demonstrate how to achieve the desired behavior. Please take a look at the implementation and consider how this approach fits your scenario.

    I hope that this helps. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Martin Vatev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 12 Oct in reply to Martin Vatev Link to this post

    Hi Martin,

    Thank you very much for your reply.

    It seems the page/download link is not available, as we are getting a "Page Not Found" error when clicking the download link to the zip file provided.

    Could you please provide a working link?

     

    Thanks very much.

  5. Answer
    Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 14 Oct Link to this post

    Hi Abhinav,

    I really apologize for the inconvenience. I reattached the project in the current response. Would you try it to download again?

    Thank you for your understanding. I hope that this time will help you.

    Regards,
    Martin Vatev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Answer
    Martin Vatev
    Admin
    Martin Vatev avatar
    90 posts

    Posted 14 Oct Link to this post

    Hello Abhinav,

    I want just to inform that we have a global issue with the attachments on our forum. We are working on the problem and I hope it will be resolved soon.

    Regards,
    Martin Vatev
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  7. Abhinav
    Abhinav avatar
    17 posts
    Member since:
    Jun 2016

    Posted 17 Oct in reply to Martin Vatev Link to this post

    Thank you, Martin. The example fits our scenario.

Back to Top
UI for WPF is Visual Studio 2017 Ready