well i have a program and i developed it by C# and WPF with Visual Studio 2010 ,
i have an window that contains a windows form datagridview (because of use of .Net Framework 3.5 for windows 7 support) i want to user can sort data in datagridview in any style that he/she wants and finally he/she can press enter on a cell of datagridview that he/she selected and then program open an detailed window about that row in datagridview , everything went well except one import thing , i use datasource of datagrid in my code like this :
if (gridView.SelectedCells.Count == 0) return;
int index = gridView.SelectedCells[0].RowIndex - 1;
but this doesn't work well because datasource of datagridview did not change even a bit after all of sort working and that is still exactly like before ...
why ? and what can i do for updating this datasource after sorting or any better way to do this ?
Thanks All , Kind Regards ,
Omid