Change radgridview row color when mouse down

2 posts, 0 answers
  1. Hui
    Hui avatar
    14 posts
    Member since:
    Jul 2016

    Posted 06 Jul Link to this post

    I want to change the row color selected by using mouse.

    private void radGridView1_RowLoaded(object sender, RowLoadedEventArgs e)
      {
               var row = e.Row as GridViewRow;
               if (row != null)
               {
                   row.IsCurrent = true;
                   row.AddHandler(GridViewRow.MouseLeftButtonDownEvent,
                new MouseButtonEventHandler(GridViewRow_MouseLeftButtonDown), true);
               }
       }
     
           private void GridViewRow_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
           {
                // not sure how          
           }

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    277 posts

    Posted 08 Jul Link to this post

    Hello Hui,

    I have updated the other thread - How to raise an event when select a row- which you have created. Please follow it for more information.

    Regards,
    Stefan Nenchev
    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
Back to Top