I have a xamGrid that shows the results from a query against a Entity Framework model context. I use the query below:
var query = from o in vm.vdb.InventoryUSsingles
select o;
vm.USsingleGrid = new ObservableCollection<InventoryUSsingle>(query);
I have a database table that may have an update row so when I requery the context the xamGrid will close any open groups I may have then the user will have to reopen any previous groups that were open. Is there a way to avoid this behavior?
Thanks,
Bryan K.
Hello Bryan,
Thank you for your post. I have been looking into it and I can suggest you see these forum threads:
http://ko.infragistics.com/community/forums/t/71570.aspx
and
http://ko.infragistics.com/community/forums/p/75431/381143.aspx
where a similar issue is discussed.
Hope this helps you.
Thanks for the reply.
Question, If I use this approach will not the grid still close but reopen the previous expanded groups giving it the same unwanted dehavior as before except this time the group is expanded? I would like to stop the refresh (closing and reopening of groups).
Bryan
You are not able to stop the grid from refreshing, becasue when a new ItemsSource is set the XamGrid's Rows should render again
I kind of figured this might be the case. Is there a way to use the same itemssource but update it instead of newing it up?
Bryan Krossley
Here you can see how to use the CRUD operations along with the XamDataGrid with different kind of DB connections:
http://ko.infragistics.com/community/blogs/kiril_matev/archive/2011/02/25/implementing-crud-in-the-infragistics-xamdatagrid.aspx