We are using latest telerik controls. In a page, I have a grid on the left side, which loads all customers' name (approx 3500) and
5 raddocks which display some information related to customer. On page load, it takes approx 7-8 seconds to load whole page with 3500 records in Customer grid and raddock with information of first selected customer. On selectedindexchange event of grid, we display the information related to selected customer in rad docks. We are using RadAjaxManager for displaying the information on selectedindexchange. In this case, it takes approx 40-50 seconds to display the data in raddocks. We checked in SQL Server Profiler, it took 30-35 seconds for sending the request to sql server. If we have less data in Customer grid (like 30-40), it works fine but if our records increase, performance gets down. It means, it is something related to Customer record but we are surprised that why it's taking time when we are using ajax and it should load only data in rad dock. Even on page load, it doesn't take much time.
5 raddocks which display some information related to customer. On page load, it takes approx 7-8 seconds to load whole page with 3500 records in Customer grid and raddock with information of first selected customer. On selectedindexchange event of grid, we display the information related to selected customer in rad docks. We are using RadAjaxManager for displaying the information on selectedindexchange. In this case, it takes approx 40-50 seconds to display the data in raddocks. We checked in SQL Server Profiler, it took 30-35 seconds for sending the request to sql server. If we have less data in Customer grid (like 30-40), it works fine but if our records increase, performance gets down. It means, it is something related to Customer record but we are surprised that why it's taking time when we are using ajax and it should load only data in rad dock. Even on page load, it doesn't take much time.
CustomerManager customerManager;
#region Page Events
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
PopulateCustomerList();
}
}
#region "dgrManageCustomer Events"
protected
void
dgrManageCustomer_SortCommand(
object
sender, GridSortCommandEventArgs e)
{
GridSortExpression sortExpr =
new
GridSortExpression();
switch
(e.OldSortOrder)
{
case
GridSortOrder.None:
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = GridSortOrder.Descending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
break
;
case
GridSortOrder.Ascending:
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = dgrManageCustomer.MasterTableView.AllowNaturalSort ? GridSortOrder.None : GridSortOrder.Descending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
break
;
case
GridSortOrder.Descending:
sortExpr.FieldName = e.SortExpression;
sortExpr.SortOrder = GridSortOrder.Ascending;
e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
break
;
}
e.Canceled =
true
;
PopulateCustomerList();
this
.dgrManageCustomer.Rebind();
}
protected
void
dgrManageCustomer_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
PopulateCustomerList();
}
protected
void
dgrManageCustomer_SelectedIndexChanged(
object
sender, EventArgs e)
{
GridDataItem selectedItem = (GridDataItem)dgrManageCustomer.SelectedItems[0];
hidCustomerID.Value = Convert.ToInt64(selectedItem.GetDataKeyValue(
"CustomerID"
)).ToString();
PopulateCustomerDetails();
}