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
I would recommend you to run through this blog post for a reference.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
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
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 ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
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
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.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.