radgridview comboboxcolumn cascading in mvvm

6 posts, 0 answers
  1. willy
    willy avatar
    3 posts
    Member since:
    Jul 2012

    Posted 28 Mar 2013 Link to this post

    Hi everyone,
    I have a radgridview with 2 comboboxcolumn, (product and package )when the user add new ítem and select ítem from the first combobox(product) should fill the second combobox with records associated with the first combobox selected ítem.

    i working with mvvm pattern i was try with itemsourcebinding but doesn't work because in the itemsource's grid is empty
    thanks in advance
    Willy
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 29 Mar 2013 Link to this post

    Hello Willy,

    I would recommend you to run through this blog post for a reference. 

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. willy
    willy avatar
    3 posts
    Member since:
    Jul 2012

    Posted 29 Mar 2013 Link to this post

    Hello Maya,
    Thanks for reply
    I saw this post, but this post not used MVVM pattern, it use code-behind, then load continent  and AvailableCountries first.

    my scenario is a Little more different, I don't have ítems before like locations, so i need to fill the combobox first independent if there are ítems or not in itemssource's grid
    understood my problem?

    thanks again for your time, and excuse me for my english

    best regards,
    Willy
  4. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 01 Apr 2013 Link to this post

    Hello Willy,

    Generally, there should be no problem to implement the functionality in an attached behavior and keep your code-behind clean. As for the other problem - loading Locations collection before having source for the grid - could you clarify a bit, what is the exact problem that you face ? 

    Greetings,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. willy
    willy avatar
    3 posts
    Member since:
    Jul 2012

    Posted 01 Apr 2013 Link to this post

    thanks Maya
    I'll try with  an attached behavior
    the problem with locations in the post is that there is a collection with 2 ítem in Locations and in this ítems have continent and countries, in my problem there aren't ítems the user must to entry the ítems therefore the source grid is empty.
    But I guess with an attached behavior i'll have selectionchanged event  right?

    Willy
  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 02 Apr 2013 Link to this post

    Hi Willy,

    The attached behavior will change the fact that your code-behind is clean while the same logic is moved to the behavior. As for inserting new items in the grid's source, there should be no problem to do so. 

    Kind regards,
    Maya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top