This is a migrated thread and some comments may be shown as answers.

Change radgridview row color when mouse down

1 Answer 10 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ardmore
Top achievements
Rank 1
ardmore asked on 06 Jul 2016, 01:59 PM

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          
       }

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 08 Jul 2016, 11:30 AM
Hello Hui,

I have updated the other thread - How to raise an event   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.
Tags
GridView
Asked by
ardmore
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or