I have a WPF Window with a datagrid dgSample
. it has been bound to a list lstSample like this:
dgSample.itemssource=lstSample;
this datagrid also has a radio button column wherein i select one row by clicking on the radio button, and then, i can move to the next page after i click on the next button. On the next page, there is again the same datagrid, with the same radiobutton column. What I want is, that when i reach this page, i want the radio button that was selected in the previous page to be selected here as well.
I have tried binding the radiobutton column with an IsSelected
Property by doing:
IsChecked="{Binding Path IsSelected, Mode=TwoWay}"
but this is not working. What can I do to make it work?
P.S.: I prefer code-behind solution than the xaml one.
Please help !