We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Edit cell while mouse over

Thread ID:





131192 Jun 27,2017 03:47 PM UTC Jul 1,2017 04:37 PM UTC WPF 4
Tags: SfDataGrid
Asked On June 27, 2017 03:47 PM UTC

I've used standard datagrid and I used this way:

     <Style TargetType="{x:Type DataGridCell}">
               <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="IsEditing" Value="True" />

How to get a similar effect using SfDataGrid? 

Srinivasan Vasu [Syncfusion]
Replied On June 28, 2017 09:20 AM UTC

Hi Rafal, 
Thanks for contacting Syncfusion support. 
We have checked your query and you can achieve the requirement by overriding the GridSelectionController. In sample, we have called the BeginEdit method for editing respective GridCell. 
Please refer the below code 
  this.datagrid.SelectionController = new SelectionControllers(this.datagrid); 
   public class SelectionControllers : GridSelectionController 
        public SelectionControllers(SfDataGrid dataGrid) : base(dataGrid) 
        protected override void ProcessPointerMoved(MouseEventArgs args, RowColumnIndex rowColumnIndex) 
            base.ProcessPointerMoved(args, rowColumnIndex); 
            if (rowColumnIndex.ColumnIndex == 2) 
                this.DataGrid.SelectionController.MoveCurrentCell(new RowColumnIndex(rowColumnIndex.RowIndex,rowColumnIndex.ColumnIndex)); 
Please download the sample from the below location. 

Srinivasan Vasu [Syncfusion]
Replied On June 28, 2017 09:35 AM UTC

Hi Rafal, 
Sorry for inconvenience. 
Please download the sample here: 

Replied On June 29, 2017 09:09 AM UTC

Hello Srinivasan,
thank you for Sample but it generate some problems. 

For examples, I can't select one row, then move mouse pointer to interesting cell without changing selection.

I've modified your example to show problem:


Look at my Video sample with std DataGrid:


Srinivasan Vasu [Syncfusion]
Replied On July 1, 2017 04:37 PM UTC

Hi Rafal, 
We have checked your query and we have moved the Selection based on currentcell of SfDataGrid. In sample, we have move the currentcell and invoke BeginEdit method to bring the edit mode while mouse move on SfDataGrid. So, that the selection moved to corresponding datarow based on currentcell. 
In sample, you have set AllowRowHoverHighlighting as true to show the Hovers of Highlighting rows. This is the default behavior in our side. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon