0

here is the scenario I want ta achieve on some XamDataGrid

  1. Some Cells may be selected in the grid - cells and not records

  2. 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 was not selected before

BTW - I have no problem getting the entire Record, but what I require is the specific Cell.

any idea?

4

1 回答 1

0
private void GridCellActivated(object sender, CellActivatedEventArgs e)
{
    if (((UnboundField)((e.Cell).Field)).BindingPath.Path != null)
    {
      var _fieldPath = ((UnboundField) ((e.Cell).Field)).BindingPath.Path;   
    }
}
于 2011-12-15T08:23:17.500 回答