Selected item gridViewComboBoxColum,

2 posts, 0 answers
  1. Robin
    Robin avatar
    2 posts
    Member since:
    Jan 2015

    Posted 27 Jan 2015 Link to this post

    Hi,

    I work in XAML and I have a RadGridView with a GridViewComboBoxColumn in it. If i change the item selected in the ComboBox, it display some informations and hide some others (depends on which item is selected).

    This behaviour works, but the problem is, if i change the selected item in ComboBox, i have to click somewhere else or press tab before it raise an event. I tryed with almost all the event possibly raised by a RadGridView and the result's the same. How can i know the exact moment when the user clicks on an item in the ComboBox ?

    I can provide the code if needed.

    Thanks.
    Robin.
                                               
  2. Stefan
    Admin
    Stefan avatar
    1073 posts

    Posted 29 Jan 2015 Link to this post

    Hello Robin,

    In order to achieve your goal please refer to the Handle SelectionChanged for the GridViewComboBoxColumn.

    The GridViewComboBoxColumn actually uses the RadComboBox "behind the scenes", so if you are not convinced with the approached described in the above documentation article, you could implement a RadComboBox within a CellEditTemplate and fire the SelectionChanged event in it. Please check the code snippet below:
    <telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn.CellEditTemplate>
            <DataTemplate>
                <telerik:RadComboBox SelectionChanged="OnSelectionChanged"/>
            </DataTemplate>
        </telerik:GridViewDataColumn.CellEditTemplate>
    </telerik:GridViewDataColumn>

    Let me know how these approaches work for you.

    Kind Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top