-1

I have a grid control data table within cell template combobox. i'm listening for selectionChanged event from it (using mvvm), and can't get a GridRow parent from a child (with VisualTreeHelper.GetParent((ComboBox)EventArgs.Source)).

Can you help me to get a binded object of parent row?

It has some information to update data base (guid and new value, changed with combobox). in default wpf DataGrid it looks like:

DataGridRow dgr = DataGridRow.GetRowContainingElement((ComboBox)sender);
var v = ((MyItem)dgr.DataContext).Guid;
Simon Bosley
  • 1,114
  • 3
  • 18
  • 41
bmo
  • 111
  • 5

1 Answers1

-1

i got this by CellValueChangedEventArgs.Row property

bmo
  • 111
  • 5