ChrisFletcher
ChrisFletcher

Reputation: 1042

WPF Listview/Gridview setting selected item when combobox is clicked

I'm having issues using a GridView as a ListView's View, what I want to do is fire an event when a user makes a selection from a combobox within the Gridview and pass the selected item within the event.

Thanks

Upvotes: 5

Views: 2225

Answers (2)

ChrisFletcher
ChrisFletcher

Reputation: 1042

I 'solved' my issue by using the WPF Toolkit grid (http://wpf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29117) and a series of selected items, which is probably a cleaner solution anyway. Doesn't explain the behavior of the GridView, which is to me unusual

Original link has died, believe this to be the one https://github.com/xceedsoftware/wpftoolkit/wiki/DataGrid

Upvotes: 1

Qpeg
Qpeg

Reputation: 11

I am seeing a similar behavior. My hypothesis is that one or more layers of the DataTemplate of each item in the list is swallowing the RoutedEvent that should have resulted in a new selection. Is it possible to, in a generic way, tell the items in the DataTemplate that they should never stop the event from bubbeling or tunneling further, without having to override every focus-triggering event handler in code behind?

Upvotes: 1

Related Questions