Hello everybody !
i've got a RadGrid with paging enabled and 1600+ rows.
and i wanted to optimize it's performance by querying data only for items which are currently shown, so i made NeedDatasource event look like this :
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
int currentPageIndex = RadGrid1.MasterTableView.CurrentPageIndex;
int itemsToTake = RadGrid1.PageSize;
int offset = currentPageIndex * itemsToTake;
var ds = GetGridDataSource(itemsToTake, offset);
RadGrid1.DataSource = ds;
}
it worked, but the pager now dissapeared, i tryed to set VirtualItemCount property to 1600, but nothing happened.
are there any possibility to set Pager pages count ? or maybe there exists better solution to optimize performance ?
Thank You !