views:

45

answers:

2

Hey, Guys

As I have a DataGrid as another DataGrid's RowDetailsTemplate, I've got a strage effekt. If I Change selection in my inner DataGrid, the SelectionChanged-Method in the outer Grid is automatically caled, too. I don't know why, but I would like to know, what I can do against this.

Thx

+1  A: 

Just a guess, but is it because SelectionChanged is a routed event and is just bubbling up through the outer DataGrid? If so, just be sure to check the sender parameter to see which DataGrid the event actually belongs to, before handling it.

chaiguy
If I Use the RoutedEventArgs.OriginalSource I can check if it's the Grid for the right function, thx
Tokk
+1  A: 

Ah, good, I had the same Problem