hi,
i have an approach to make my profile.aspx page faster. That page includes a panelbar with 6 different panelitems, each containing at least one grid gathering information from the database. I thought to make the page faster. i dont query the database for the grids and hold all panelitems collapsed except of the top/first panelitem.
so if the user wants to see the information of a panelitem, following mechanic comes into play:
the grid in the panelitem is still created in and configured as stated in my aspx code file. It just gets no DataSource:
the grid is only allowed to load the data from the database if the panelitem got expanded.
hint: dont forget to ajaxify the panelbar and the grid.
another feature is that if the panelitem gets collapsed and expanded it gets the data from server again so its uptodate.
how u find it? please tell me if thats a good approach.
thx, mario
i have an approach to make my profile.aspx page faster. That page includes a panelbar with 6 different panelitems, each containing at least one grid gathering information from the database. I thought to make the page faster. i dont query the database for the grids and hold all panelitems collapsed except of the top/first panelitem.
so if the user wants to see the information of a panelitem, following mechanic comes into play:
the grid in the panelitem is still created in and configured as stated in my aspx code file. It just gets no DataSource:
protected void RadGridRelations_NeedDatasource(object source, GridNeedDataSourceEventArgs e) |
{ |
RadPanelItem panelItem = panelBarProfile.FindItemByValue("relations"); |
if (panelItem.Expanded) |
{ |
RadGrid radGrid = source as RadGrid; |
radGrid.DataSource = BLDocument.GetAllRelatedDocumentsMultipleTimes(CacheHelper.Instance.Document.id, _userId); |
radGrid.MasterTableView.NoMasterRecordsText = LanguageHelper.GetText("noRelationsText"); |
} |
} |
the grid is only allowed to load the data from the database if the panelitem got expanded.
hint: dont forget to ajaxify the panelbar and the grid.
another feature is that if the panelitem gets collapsed and expanded it gets the data from server again so its uptodate.
how u find it? please tell me if thats a good approach.
thx, mario