开发者

Xamdatagrid howto get the current Cell on right click

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 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;   
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜