GridViewComboBoxColumn and selected value

3 posts, 1 answers
  1. Mrn
    Mrn avatar
    29 posts
    Member since:
    Apr 2011

    Posted 10 Nov 2011 Link to this post

    Hello,

    Is there any way to get the selected item/value of the combo box of the GridViewComboBoxColumn? Or an event triggered when selection changes, as the regular RadComboBox? I'd like to perform some operations depending on the selection made by the user at the moment she changes the selection (what I'd implement in SelectionChanged event of RadComboBox)...

    Thanks!
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 10 Nov 2011 Link to this post

    Hello,

    Generally, you can get the selected item from the value of the underlying property of your business object. As it is in the case illustrated in our online documentation, you can find the selected item (Country) from the CountryID property of Person object.
    Still, you can handle SelectionChanged event of the editing element (RadComboBox) of GridViewComboBoxColumn as follows:

    this.AddHandler(RadComboBox.SelectionChangedEvent, new Telerik.Windows.Controls.SelectionChangedEventHandler(OnSelectionChanged));
               
       
            private void OnSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
            {
                if (e.RemovedItems.Count > 0)
                {
                    //Here you can place your logic for handling the case when an item is selected from the combo box.
                }
            }


    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Mrn
    Mrn avatar
    29 posts
    Member since:
    Apr 2011

    Posted 11 Nov 2011 Link to this post

    Ok, thanks
Back to Top