Hi,
I have a grid with 93 columns and about 1500 records. As I progressively select fields in the Field Chooser, the grid becomes slower and slower to react and it's pretty unusable when you get to the last columns. How can I improve performance? All the fields have Width set to Auto. Is there a way to perhaps call the Autosize after the fields have been selected and Field Chooser is closed instead of doing it on the fly?
Also, is there a way to add an animation to let the user know it's working in the background while it's waiting for the field to be selected?
Thank you.
Hi Cheryl,
I have modified the sample and removed the XamBusyIndicator from the project in order to be able to run it against 14.2. Are you able to observe this slow performance in the attachment that I am providing you? In order to implement the shortcut key you have to hook on the PreviewKeyDown event of the FieldChooser and detect there the Ctr+A combination which will trigger the selection of the FieldGroupSelector. You can observe how to do that in the attached sample below. The xDG.DefaultFieldLayout.Fields.BeginUpdate() method and EndUpdate() are used if you are adding or removing Fields from the Fields collection. Checking and unchecking fields from the FieldChooser is not removing the fields but only changing their visibility to collapse so these methods won't affect the performance of the FieldChooser.
So please review my sample and see whether you are observing this slow performance there and please notice that I am also using 93 columns and 1500 records. If not, please try to isolate the issue in your own sample and attach it here in order to be able to investigate the issue.
Sincerely,TeodorSoftware Developerwww.infragistics.com/support
Hi Teodor,
That makes sense, I am currently using version 14.2.
I am using your code to autosize once instead of every time a field is added but the Field Chooser is still very slow. As I mentioned before I have 93 columns with 1500 records. I saw on the link below that I could potentially try BeginUpdate and EndUpdate? If yes, how do I use them? Is there anything else you recommend? I tried some of the optimisations on the following page but it's still slow:
http://ko.infragistics.com/community/blogs/kiril_matev/archive/2010/10/26/optimizing-xamdatagrid-performance.aspx
Also, is there a way to implement a shortcut key on the Field Chooser so for example, pressing Ctrl+A will cause all the fields to be selected?
Are you using version 15.2 or above of Infragistics components? XamBusyIndicator is introduced in our 15.2 Release and is located in the InfragisticsWPF4.v15.2/InfragisticsWPF4.v16.1 assembly. You can try adding the dlls manually if still some assembly can not be located from the GaC or try adding the xamBusyIndicator from the Toolbox, this way its assembly will be automatically added to the project.
Thanks,TeodorSoftware Developerwww.Infragistics.com
Thank you for your quick reply. I tried your solution but I keep getting the following error. Can you please advise?
Error 1 The name "XamBusyIndicator" does not exist in the namespace "http://schemas.infragistics.com/xaml".
Hello Cheryl,
I have been looking into your issue and have created a sample which corresponds to your specifications but I am not able to observe the slow performance that you are mentioning. However I have achieved the desired feature to set the width of the selected fields to auto when the FieldChooser dialog is closed and also added our control XamBusyIndicator in order to have animation wherever you think the performance is slow. You can review my sample and read more about XamBusyIndicator here.
If you need further assistance do not hesitate to ask, I will be glad to help.
Thanks,TeodorSoftware Developerwww.infragistics.com