<DataGridTemplateColumn.CellStyle> <Style TargetType="{x:Type DataGridCell}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="IsEditing" Value="True" /> </Trigger> </Style.Triggers> </Style> </DataGridTemplateColumn.CellStyle>
How to get a similar effect using SfDataGrid?
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));
this.DataGrid.SelectionController.CurrentCellManager.BeginEdit();
}
}
} |
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:
https://drive.google.com/file/d/0B_dqnXZHa3PHbVNHczdlakhhbXc/view?usp=sharing
Look at my Video sample with std DataGrid:
https://youtu.be/K6QCULCROZk