SelectionChanged on ComboBoxColumn

4 posts, 0 answers
  1. Hans Peter
    Hans Peter avatar
    30 posts
    Member since:
    May 2006

    Posted 23 May 2011 Link to this post

    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




  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 24 May 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Hans Peter
    Hans Peter avatar
    30 posts
    Member since:
    May 2006

    Posted 24 May 2011 Link to this post

    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
  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 26 May 2011 Link to this post

    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
Back to Top