Hi,
we have a RadGrid control which has custom paging enabled. The maximum page size is equal to 50 records.
When the selected page size is equal to 30 records, the DataBind takes about 3 seconds to complete and the time is increased when page size increases.
Each GridTemplateColumn consists of a literal control which value is set in the DataBind event (see the code below).
The value of the literal changes to the DataBind event as below
{
}
}
The RadGrid consists of 24 columns.
How can we reduce the DataBind time??
Thank you very much,
Angie
we have a RadGrid control which has custom paging enabled. The maximum page size is equal to 50 records.
When the selected page size is equal to 30 records, the DataBind takes about 3 seconds to complete and the time is increased when page size increases.
Each GridTemplateColumn consists of a literal control which value is set in the DataBind event (see the code below).
<custom:RequestUrgency DataField="SolverUrgencyId" Groupable="false" FilterControlWidth="180px" HeaderText="Αμεσότητα" UniqueName="RequestSolverUrgency">
<headerstyle width="15%" />
<ItemTemplate>
<asp:Literal ID="litSolverUrgencyId" runat="server" Text='<%# Eval("SolverUrgencyId") %>'>
</asp:Literal>
</ItemTemplate>
</custom:RequestUrgency>
The value of the literal changes to the DataBind event as below
protected void gridRequests_ItemDataBound(object sender, GridItemEventArgs e)
{
try
{
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
#region Urgency
Literal litSolverUrgencyId = (Literal)e.Item.FindControl("litSolverUrgencyId");
dt = DAL.GetServiceRequestUrgency(request.SolverUrgencyId);
litSolverUrgencyId.Text = dt.Rows[0]["Title"].ToString();
}
// if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
}
catch{
}
}
The RadGrid consists of 24 columns.
How can we reduce the DataBind time??
Thank you very much,
Angie