If someone could help me understand a performance issue I'm having with the RadGrid I would be very grateful
I'm displaying a list of Orders, each one has a DetailView of the Lines in that Order. There are around 2000 orders. The Order Lines in the DetailView are loaded on demand, and I've double-checked the datasource is not getting hit, so I'm guessing that has nothing to do with the performance.
I've traced the page, and the PreRender Event takes around 5 seconds. The database query takes about 0.5, my conversion from a Business Object to a Dataset takes 0.4 seconds, but I'm at a loss as to what that other 4 seconds is for.
Could someone give me a pointer please?
I'm displaying a list of Orders, each one has a DetailView of the Lines in that Order. There are around 2000 orders. The Order Lines in the DetailView are loaded on demand, and I've double-checked the datasource is not getting hit, so I'm guessing that has nothing to do with the performance.
I've traced the page, and the PreRender Event takes around 5 seconds. The database query takes about 0.5, my conversion from a Business Object to a Dataset takes 0.4 seconds, but I'm at a loss as to what that other 4 seconds is for.
Could someone give me a pointer please?
<!-- *** Main Grid DataSources *** --> |
<asp:ObjectDataSource ID="odsCustomers" runat="server" SelectMethod="GetList" TypeName="MyProject.BLL.ListValuesDataSource" > |
<SelectParameters> |
<asp:Parameter DefaultValue="Customers" Name="ListName" Type="String" /> |
</SelectParameters> |
</asp:ObjectDataSource> |
<asp:ObjectDataSource ID="odsSalesOrderHeaders" runat="server" OldValuesParameterFormatString="original_{0}" |
SelectMethod="GetSalesOrderHeadersByCustomerIDCompletedDataSet" TypeName="MyProject.BLL.SalesOrderHeadersDataSource"> |
<SelectParameters> |
<asp:Parameter Name="CustomerID" DefaultValue="0" /> |
<asp:Parameter Name="Status" DefaultValue="CURRENT" /> |
</SelectParameters> |
</asp:ObjectDataSource> |
<asp:ObjectDataSource ID="odsSalesOrderLines" runat="server" SelectMethod="GetSalesOrderLinesByOrderHeaderIDDataSet" TypeName="MyProject.BLL.SalesOrderLinesDataSource"> |
<SelectParameters> |
<asp:SessionParameter Name="OrderHeaderID" SessionField="SelectedRecordKey" Type="Int32" /> |
</SelectParameters> |
</asp:ObjectDataSource> |
<!-- ***************************************************************************** |
* Order Headers Grid * |
***************************************************************************** --> |
<div class="gridWrapper"> |
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="odsSalesOrderHeaders" AutoGenerateColumns="False" OnLoad="RadGridFormatColumns"> |
<HeaderContextMenu EnableTheming="True"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</HeaderContextMenu> |
<MasterTableView ClientDataKeyNames="OrderID" DataSourceID="odsSalesOrderHeaders" DataKeyNames="OrderID" AllowFilteringByColumn="True"> |
<DetailTables> |
<telerik:GridTableView DataSourceID="odsSalesOrderLines" ClientDataKeyNames="OrderHeaderID" DataKeyNames="OrderHeaderID" Width="100%" > |
<ParentTableRelation> |
<telerik:GridRelationFields DetailKeyField="OrderHeaderID" MasterKeyField="OrderID" /> |
</ParentTableRelation> |
<Columns> |
<telerik:GridBoundColumn DataField="OrderLineID" Visible="false" /> |
<telerik:GridBoundColumn DataField="FK_ProductName" HeaderText="Product" /> |
<telerik:GridBoundColumn DataField="FK_PriceCode" HeaderText="Price Code" /> |
<telerik:GridBoundColumn DataField="FK_PriceDescription" HeaderText="Price Desc." /> |
<telerik:GridBoundColumn DataField="Quantity" HeaderText="Quantity" /> |
<telerik:GridBoundColumn DataField="SalePrice" HeaderText="SalePrice" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" /> |
<telerik:GridBoundColumn DataField="SaleValue" HeaderText="SaleValue" HeaderStyle-HorizontalAlign="Right" ItemStyle-HorizontalAlign="Right" /> |
</Columns> |
</telerik:GridTableView> |
</DetailTables> |
<Columns> |
<telerik:GridBoundColumn DataField="CustomerID" Visible="false" /> |
<telerik:GridHyperLinkColumn DataTextField="OrderID" HeaderText="Ref" DataNavigateUrlFields="OrderID" DataNavigateUrlFormatString="SalesOrderDetails.aspx?order={0}" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%" /> |
<telerik:GridBoundColumn DataField="FK_CustomerName" HeaderText="Customer" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%" /> |
<telerik:GridBoundColumn DataField="Department" HeaderText="Dept." Visible="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%" /> |
<telerik:GridBoundColumn DataField="AssociateSurname" HeaderText="Patient" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%" /> |
<telerik:GridBoundColumn DataField="Required" HeaderText="Required" Visible="false" DataType="System.DateTime" /> |
<telerik:GridBoundColumn DataField="FK_OrderStatus" HeaderText="Status" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%" /> |
</Columns> |
<RowIndicatorColumn Visible="True"> |
<HeaderStyle Width="20px" /> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px" /> |
</ExpandCollapseColumn> |
</MasterTableView> |
<FilterMenu EnableTheming="True"> |
<CollapseAnimation Duration="200" Type="OutQuint" /> |
</FilterMenu> |
<ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="True"> |
<Resizing AllowColumnResize="True" /> |
<Selecting AllowRowSelect="true" /> |
<ClientEvents OnRowDblClick="RadGrid1_RowDblClick" /> |
</ClientSettings> |
</telerik:RadGrid> |