GridViewComboBoxColumn not binding

3 posts, 0 answers
  1. Karthik
    Karthik avatar
    15 posts
    Member since:
    Feb 2012

    Posted 13 Feb 2012 Link to this post

    I have a RadGridView inside which I have a GridViewComboBoxColumn. For some reason my combo box column always appears to be empty. All the other columns seems to bind with the ItemSource properly

    Here is how my RadGridView looks like

    <telerikGrid:RadGridView x:Name="VGrid" d:LayoutOverrides="Width" Grid.Row="1" Grid.ColumnSpan="2"
    RowIndicatorVisibility="Collapsed" MinHeight="100" ShowGroupPanel="False"
     AutoGenerateColumns="False" ItemsSource="{Binding Rows}">

    Row is a simple class which has a bunch of string properties and also a collection of objects called Source.
    Source is also a simple class with properties, id and name.

    My Combobox column looks like this

    <telerikGrid:GridViewComboBoxColumn Header="Source" IsSortable="True"
    ItemsSource="{Binding Sources}" DataMemberBinding="{Binding id}"
    ="{Binding id}"  ></telerikGrid:GridViewComboBoxColumn>

    I have read a lot of posts similar to the problem that am facing, but couldn't really figure out why my combo box column is empty.
    (Of course I have checked more than once that my Sources collection in Row is not empty).

    Any ideas, clues will be greatly appreciated

    (PS: I have the same thread duplicated in combobox category as well)

  2. Dimitrina
    Dimitrina avatar
    3769 posts

    Posted 14 Feb 2012 Link to this post


     I believe that in your case you should set he source using ItemsSourceBinding instead of ItemsSource. More details on how the GridViewComboBoxColumn works is available here.

    Does this solves your problem?

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Karthik
    Karthik avatar
    15 posts
    Member since:
    Feb 2012

    Posted 14 Feb 2012 Link to this post

    Thanks for the reply that does solve the problem, but going ahead am stumbling upon another issue. When I select an item from the CombBox, the selected item does not get bound to the property unless I click on another cell. In other words the selected item does not get updated until the cell looses focus.

    Is there a way around it?

Back to Top