Click here to Skip to main content
16,019,764 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am designing a web application in silverlight using mvvm..

my scenario:-
i have a child window where the datas are binded to it..if i click any row in the data grid and click edit button another childwindow should open with textboxes binded from the selected item of data grid...both childwindows have separate viewmodels and models..

my problem:-
after selecting a row in datagrid i click the edit button,but the values are not binding in the textboxes of the selected item... my problem is when i pass selecteditem value from parent viewmodel(datagrid childwindow) to child viewmodel(edit childwindow) the selected items are NULL...

can anybody give me a suggestion for this problem???
Posted

You can use an Action delegate to go back to the first view when edit is clicked in the second view.
 
Share this answer
 
If I understand correctly you do not know in which row an edit button were clicked. In that case you should use the CommandParameter.
HTML
<button commandparameter="{Binding}" ...="" />
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900