RadGridView ComboBox Column Binding problem

6 posts, 0 answers
  1. Xu
    Xu avatar
    4 posts
    Member since:
    Dec 2010

    Posted 24 May 2011 Link to this post

    Hi, Telerik Guys

    I have a question for ComboBox Column, I posted this issue in my blog, is this really a bug or it was designed as it?
    http://chunxusky.blogspot.com/2011/05/telerik-silverlight-radgridview.html

    it's really annoying when I try to use MVVM to bind the ComboBox column

    thanks

  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 May 2011 Link to this post

    Hello Xu,

    In fact it is not a bug . As described in the documentation , you  should use the ItemsSourceBinding property in this scenario.

    So as a fix , in your XAML , just replace the 'ItemsSurce'  with 'ItemsSourceBinding' and this should fix the things up.

    Regards,
    Pavel Pavlov
    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
  3. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 May 2011 Link to this post

    Hello Xu,

    As a side note, in case  the proposed fix works for you I would kindly ask you to update your blog , as  it may cause some confusion  and misleading.

    All the best,
    Pavel Pavlov
    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
  4. Xu
    Xu avatar
    4 posts
    Member since:
    Dec 2010

    Posted 25 May 2011 Link to this post

    hello, Telerik Admin

    I understand very well what difference between ItemsSource and ItemsSourceBinding and I tried to use ItemsSourceBinding to replace ItemsSource, it doesn't work... furthermore , it's getting worse, nothing displayed in the ComboBox column

    at the end of my blog, I provided a sample project to download, have you ever try this project? in that demo, I show this issue.


  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 May 2011 Link to this post

    Hello Xu,

    Thanks for pointing me out the sample . I took a look  and here are my findings : 

    Having :
    ItemsSource="{Binding Countries}"
    Means "Take the items source from the Countries property of the datacontext of the cell".



    However the DataContext of the cell, when data is loaded , is set to the business object relevant to the row , not the datacontext of the page.

    This is by design .



    In other words:
    The datacontext of the cell will be a "People" object , which of course does not have the "Countries" property .

    That is why the binding gets broken .


    Hope this clarifies the things.

    Regards,
    Pavel Pavlov
    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
  6. Alejandro
    Alejandro avatar
    1 posts
    Member since:
    Feb 2012

    Posted 08 Mar 2012 Link to this post

    Is there any fix of this? Any way to make this work?
Back to Top