GridViewComboBoxColumn doesn't work properly on edit

2 posts, 0 answers
  1. Ramsha
    Ramsha avatar
    4 posts
    Member since:
    Feb 2016

    Posted 15 Feb Link to this post

    The ItemsSource of GridView:

    ProductID,

    Name,

    Code,

    ProductTypeName(GridViewComboBoxColumn)

    The ItemsSource for GridViewComboBoxColumn :
    ProductTypeID,

    ProductTypeName

    The problem is when I select another item from the ComboBox after double clicking the column in the RowEnded event, it doesn't give me the Updated ProductTypeID, instead it always gives me the ProductTypeID which was first bound when I loaded the GridView. I think there is some issue with the Bindings

    Here is the Xaml:

    <telerik:RadGridView.Columns>
       <telerik:GridViewDataColumn x:Name="ID" 
            DataMemberBinding="{Binding ProductID}" 
    Header="ID" 
    IsReadOnly="True" 
            IsVisible="False"/>

        <telerik:GridViewDataColumn x:Name="Code" 
            DataMemberBinding="{Binding Code}" 
            Header="Code" 
            IsReadOnly="False" />

        <telerik:GridViewDataColumn x:Name="Name" 
            DataMemberBinding="{Binding Name}" 
            Header="Name" 
            IsReadOnly="False" />
                       
    <telerik:GridViewComboBoxColumn DataMemberBinding="{Binding ProductTypeName}"
            UniqueName="ProductType"
            SelectedValueMemberPath="ProductTypeName"
            DisplayMemberPath="ProductTypeName"
            Header="ProductType"/>

        </telerik:RadGridView.Columns>
    </telerik:RadGridView>

  2. Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    371 posts

    Posted 16 Feb Link to this post

    Hello Ramsha,

    I believe you would find the following article regarding the ComboBox Column helpful. I would also recommend having a look at our developer-focused examples in our SDK Examples Browser and more specifically - the ones regarding the ComboBoxColumn. Please also have a look at the following demo about the RadGridView ComboBoxColumn.

    To help you out, I've attached a sample project, resembling the scenario you've described. Please have a look at it and let me know whether it works for you.

    Regards,
    Dilyan Traykov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top