Editing a row by showing RadWindow when being double click

3 posts, 0 answers
  1. Robert Peter
    Robert Peter avatar
    6 posts
    Member since:
    Jun 2014

    Posted 04 Sep 2014 Link to this post

    Editing a single row by showing a RadWindow with the data of a row on its fields. I want to do that by double clicking a row of RadGridView.

    Here is my code snippet for EventHandler when double clicking:

    1.private void grdProducts_MouseDoubleClick(object sender, MouseButtonEventArgs e)
    3.  Product product = (sender as "not-sure-what-to-use-here-as-sender") as Product;
    4.  ShowProductWindow(product);

    Here is my code snippet for calling the RadWindow:
    01.private void ShowProductWindow(Product product)
    03. if (product != null)
    04.    {
    05.   ProductWindow productWindow = new ProductWindow(product, amazonContext);
    06.   productWindow.Closed += ProductWindowClosed;
    07.   productWindow.ShowDialog();
    08. }

    Can anyone help me to accomplish this? It would be a great help.

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 08 Sep 2014 Link to this post


    You can subscribe for the RowActivated event of RadGridView and show RadWindow once the event is raised. Please note this event will be raised every time you double click or hit an Enter on a row.

    As another option, I can suggest you to use the approach from the Click Events WPF demo. 

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. Robert Peter
    Robert Peter avatar
    6 posts
    Member since:
    Jun 2014

    Posted 08 Sep 2014 in reply to Dimitrina Link to this post

    I just solved my problem. What I did is:

    Product product = grdProduct.SelectedItem as Product;
Back to Top