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

Cascading ComboBoxes - Identify Calling Combo

1 Answer 34 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark Shortt
Top achievements
Rank 1
Mark Shortt asked on 03 Jun 2011, 06:47 PM
Hi

I have a GridView with 4   GridViewComboBoxColumn

I have been following the code for cascading comboboxes in the blog here http://blogs.telerik.com/pavelpavlov/posts/10-01-27/cascading_comboboxes_selection_in_radgridview_for_silverlight_and_wpf.aspx

Using that sample the code in the comboSelectionChanged event fires when any of the Combo Box Columns values change. Is there a way to cause the changed event to only fire when a particular combo is changed?

Thanks

Mark

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 06 Jun 2011, 07:51 AM
Hi Mark Shortt,

You may try to find the corresponding column as follows:

RadComboBox comboBox = (RadComboBox)args.OriginalSource;
           var cell = comboBox.ParentOfType<GridViewCell>();
           if ((cell.Column as GridViewComboBoxColumn).DataMemberBinding.Path.Path == "CountryID")
           {
               MessageBox.Show("the column is CountryID");
           }

However, based on the specifics of the example, the SelectionChanged event will be fired if the value from the first column is changed. So, if the suggested approach does not correspond to your requirements, please share a bit more details on the exact scenario that you want to accomplish. 
 

Regards,
Maya
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
GridView
Asked by
Mark Shortt
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or