I am using MVVM light with silverlight 4. I am using EventToCommand to get selected rows from the datagrid. However i am not able to do it in reverse way i.e. from some defined value say 2 in view model how can I ask to place selection to row no 2 in the datagrid on view?'
My scenario I am using it for inserting new data in database. From ViewModel i am able to generate the new row in datagrid by adding one more item in ObservableCollection. Now I want to view to select that defined new row. How could I do that.
My logic is: 1. since we can have total number of data record we know which one is that last row. 2. By using the Last row's number I want to create some event that will tell datagrid to select that row.
I am working on this for few days and not getting any idea how it works using MVVM light.