This is a migrated thread and some comments may be shown as answers.

radgridview comboboxcolumn cascading in mvvm

5 Answers 202 Views
GridView
This is a migrated thread and some comments may be shown as answers.
willy
Top achievements
Rank 1
willy asked on 29 Mar 2013, 02:57 AM
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

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 29 Mar 2013, 07:03 AM
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.

0
willy
Top achievements
Rank 1
answered on 29 Mar 2013, 03:31 PM
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
0
Maya
Telerik team
answered on 01 Apr 2013, 07:04 AM
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.

0
willy
Top achievements
Rank 1
answered on 01 Apr 2013, 05:09 PM
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
0
Maya
Telerik team
answered on 02 Apr 2013, 07:12 AM
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.

Tags
GridView
Asked by
willy
Top achievements
Rank 1
Answers by
Maya
Telerik team
willy
Top achievements
Rank 1
Share this question
or