Isn't there a way to tell what control fired a routed event? I have a SelectionChangedEvent for use by a combobox on a radgridview. I want the coding in that event to handle only that combobox and no others. I tried using e.OriginalSource.Name, ToString, sender.ToString, sender.Name but all return "". So there's no way to tell what combobox is being processed by the event.
Code to create event:
Me.AddHandler(RadComboBox.SelectionChangedEvent, New System.Windows.Controls.SelectionChangedEventHandler(AddressOf FinishedEndsChanged))
Code inside event:
Private Sub FinishedEndsChanged(ByVal sender As Object, ByVal e As SelectionChangedEventArgs)
Try
If dgChosenItems.SelectedItems.Count > 0 Then
Dim comboBox As RadComboBox = CType(e.OriginalSource, RadComboBox)
If comboBox.SelectedValue IsNot Nothing Then
Dim endChosen As String = CStr(comboBox.SelectedValue)
Thanks.
I believe I found the answer here: [https://www.telerik.com/forums/selection-changed-event-for-gridviewcombobox-column]
I chose to use SelectedValudPath.
Thanks, Patrick, for taking the time to reply.