Hi,
I would like to implement similar behaviour to Excel in the XamDataGrid in that if you click on a cell it immediately enters edit mode. Whereas if you hold the mouse down over a cell and drag you do a multiple select of all the cells you drag over.
I get the first behaviour with..<igDP:FieldSettings CellClickAction="EnterEditModeIfAllowed" />
and the second behavior with...<igDP:FieldSettings CellClickAction="SelectCell" />
In addition I have the following settings..<igDP:FieldLayoutSettings SelectionTypeCell="Extended" SelectionTypeRecord="Extended" SelectionTypeField="Extended" />
How can I get both of these behaviours working on the grid. I don't see why this should be impossible as a click on a cell is surely different than a cell selection drag ?
HI,
You could force the cell into edit mode by using a DataPresenterCommand.
Wire up the PreviewMouseLeftButtonDown event.
Here is the code snippet:
void xamgrid1_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { // throw new NotImplementedException(); DependencyObject soruce = e.OriginalSource as DependencyObject; if (soruce == null) return; CellValuePresenter cvp = Infragistics.Windows.Utilities.GetAncestorFromType(soruce, typeof(CellValuePresenter), true) as CellValuePresenter; if (cvp == null) return; cvp.IsActive = true; xamgrid1.ExecuteCommand(DataPresenterCommands.StartEditMode); }
Sincerely, Matt Developer Support Engineer
I am following up on this forum thread.
Do you need further assistance regarding this issue, please let me know