I'm fairly new to xamDataGrid but I've played about with the demos etc. I was wondering if it's possible to change the sort order of the grid columns during run-time?... i.e. can the user drag columns left or right, or can I even re-organise them through code?
Hello,
I have modified the sample Yanko attached, so now the ordering of the Fields is achieved by changing their position in the Layout by setting their Column Properties.
Hope this helps you.
I try to change the column order at runtime using the move methode on the fields and i am having the same problem with index 0 columne not moving. My version is 12-1.
Anybody around having more luck?
Thanks for your help Yanko. Very much appreciated.
Hi Tommy,
Here is the results of my investigation.Definitely, you can reorder(or reorganise) the xamDataGrid columns through code.For the purpose you can use the Move method (inherited from the base ObservableCollection) on the FieldCollection.This method changes the location of the field in the collection. The attached ReorderXamDataGridColumnsProgrammatically sample application contains the full solution implementation.
Best Regards,Yanko
Hi,
If you want to know how to programmatically sort and group the xamDataGrid fields I advise you to see the way described in the online documentation http://help.infragistics.com/Help/NetAdvantage/WPF/2008.1/CLR3.X/html/xamData_Programmatically_Sort_and_Group_Fields.html .
With regard to the reordering the xamDataGrid columns in the display which is what you seem to be asking about I will investigate the possibility and let you know how to reorder (reorganise) them through code.
Best Regards,
Yanko