Click here to Skip to main content
15,888,162 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Using Silverlight and c#:
I have a datagrid having PropertyGroupDescription added to it and also have Item templates in it.. If I edit a row which is exist in the middle of the grid..after saving that data by using that save button in the panel...what happened is the data grid rebinding and the pointer goes to the first record in the datagrid. I want the scroll to maintain its position to the row which is edited after its ItemSource is changed. I tried using ScrollIntoView as follows:
C#
tblSessionDataGrid.SelectedItem = objSelectedItem;
tblSessionDataGrid.CurrentColumn = tblSessionDataGrid.Columns[0];
tblSessionDataGrid.ScrollIntoView(objSelectedItem, tblSessionDataGrid.Columns[0]);

objSelectedItem holds the recently edited Item.
But its now working. Can anyone please suggest where I am going wrong?
Posted
Comments
[no name] 5-Aug-15 9:10am    
http://www.codeproject.com/Messages/5103842/Maintain-scroll-position-in-datagrid-after-edit-Si.aspx

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