Hi,
I have a persistent class that contains of 30 properties. Each of them is a string. Then I created 100 entries / objects and tried to display all of them in the gridview (listview).
So the gridview should have 30X100 cells now. (Paging count = 100) It is horrible slow. Takes about 15 seconds to load / render the grid.
I use ServerMode and I set ControlRenderMode to Lightweight.
It's a bit faster in Chrome, but still not acceptable.
What is wrong?
Thanks for any help,
Torsten
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Torsten,
I have tested the ASPxGridView with the mentioned count of rows and columns, and found that the size of the generated HTML code is very big. This causes a significant delay, especially in IE. The main cause is that the ASPxGridView is rendered via HTML tables, and I am afraid that is it impossible to change this behavior. However, you can significantly decrease the size of the generated HTML, and thus improve performance, after removing the default DataItemTemplate from data columns using the following ViewController:
public class ViewController1 : ViewController { public ViewController1() { TargetViewType = ViewType.ListView; } protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); ASPxGridListEditor editor = ((ListView)View).Editor as ASPxGridListEditor; if (editor != null) { foreach (GridViewColumn column in editor.Grid.Columns) { if (column is GridViewDataColumn && !(column is GridViewDataActionColumn)) { ((GridViewDataColumn)column).DataItemTemplate = null; } } } } }
Please let me know if you need any further help.
Thanks,
Anatol
Hello Torsten,
Can we make this discussion public?
Thanks,
Dennis
Hey Anatol,
thank you for your help. Yes I already figured the amount of tables. There is one for each grid cell. my code has about 4000 lines of HTML code and I am aware that IE has problems rendering this.
But what is interesting is, that if I use the ASPxGridview as a control only (not in XAF) and use the same datasource it is significantly faster. Have you checked that?
And I will try your controller today and come back to you.
@Dennis: Yes sure, make it public. I am going to annouce it in the forum.
Thanks guys.
Hello Torsten,
The pure ASPxGridView is faster, because it does not implement the functionality that XAF ASPxGridView does. For example, in the XAF ASPxGridView, templates are used for data cells by default. They cause additional tables you mentioned to be generated in the HTML code. If you use my suggestion, tables will not be generated.
Thanks,
Anatol