This is a migrated thread and some comments may be shown as answers.

SelectionChanged on ComboBoxColumn

3 Answers 180 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Hans Peter
Top achievements
Rank 1
Hans Peter asked on 23 May 2011, 08:47 AM
Hi,

im using a TreeListView and would like to get an event, when the selection in a ComboboxColumn changes. I can't find any event helping me. Here is my XAML:

		<telerik:RadTreeListView Name="rtlvQuery" Grid.Column="0" Grid.Row="0" IsDragDropEnabled="true" Margin="30" AutoGenerateColumns="False" >
			<telerik:RadTreeListView.ChildTableDefinitions>
				<telerik:TreeListViewTableDefinition ItemsSource="{Binding Filters}" />
			</telerik:RadTreeListView.ChildTableDefinitions>
			<telerik:RadTreeListView.Columns>
				<telerik:GridViewDataColumn DataMemberBinding="{Binding IsActive}" Header="Active" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding Description}" Header="Description"/>
				<telerik:GridViewComboBoxColumn ItemsSourceBinding="{Binding AvailableFilterTypes}" DataMemberBinding="{Binding FilterType}"  
												Header="Type" SelectedValueMemberPath="Value"  DisplayMemberPath="DisplayName" />
				<telerik:GridViewDataColumn DataMemberBinding="{Binding IsNegated}" Header="Negate"/>
 
			</telerik:RadTreeListView.Columns>
		</telerik:RadTreeListView>

I use a ItemSourceBinding because the available Combobox is bound to a filtered List of EnumMemberViewModel build by EnumDataSource.FromType<FilterType>( );

I tried the following, that I found in the forum for RadGridView, but thta doesn't seem to work in TLV:

		<Grid.Resources>
			<Style TargetType="telerik:RadComboBox" >
				<EventSetter Event="SelectionChanged" Handler="ComboBox_SelectionChanged" />
			</Style>
		</Grid.Resources>

Any idea, how I could solve this?

Thanks
Hans




3 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 24 May 2011, 10:21 AM
Hello Hans Peter,

Could you please elaborate of your need to listed for SelectionChange. There might be a more elegant way to achieve the desired result.


Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Hans Peter
Top achievements
Rank 1
answered on 24 May 2011, 11:34 AM
Hi Milan,

thanks for the answer. I have a TLV were the nodes are part of a userdefined query composed with AND and OR groups. I'm looking for a solution, where the user can change the type from a group from OR to AND and otherwise. So I bound an enum to the combobox column. When the group is changed, some other things have to be updated. So I need an event, when the user changes the value. Now I'm using a CellTemplate, but that is for shure not the elegant way. It would be great, if you could add such an event to the GridViewComboBoxColumn.

Greetings,
Hans Peter
0
Pavel Pavlov
Telerik team
answered on 26 May 2011, 03:14 PM
Hi Hans Peter,

One of the ways to sense changes in the selected value in a combo inside RadGridView is described in
point 3 of this blogpost.

There is some code illustrating how to subscribe to the selection changed event of a combo inside RadGridView.

All the best,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeListView
Asked by
Hans Peter
Top achievements
Rank 1
Answers by
Milan
Telerik team
Hans Peter
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or