Xamdatagrid howto get the current Cell on right click
here is the scenario I want ta achieve on some XamDataGrid
Some Cells may be selected in the grid - cells and not records
User right clicks on a cell in the grid
I would like to add the right clicked cell to the SelectedItems.Cells collection of the XamDataGrid if it wa开发者_运维问答s not selected before
BTW - I have no problem getting the entire Record, but what I require is the specific Cell.
any idea?
private void GridCellActivated(object sender, CellActivatedEventArgs e)
{
if (((UnboundField)((e.Cell).Field)).BindingPath.Path != null)
{
var _fieldPath = ((UnboundField) ((e.Cell).Field)).BindingPath.Path;
}
}
精彩评论