This is a migrated thread and some comments may be shown as answers.

Is there an overhead to a listview if its unused

2 Answers 79 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 09 Sep 2011, 02:57 PM
Hi. I have a website where there a some different types of data (A, B, C...). The obvious solution is for me to have a separate page to display each type of data (Page_A, Page_B....). Each would have a listview to display a list of the corresponding data and each listview would be different to reflect the different types of data and also the different functionality required for each type/list. HOWEVER, there is some complex functionality separate to the actual listviews that would be common to all of the pages. This functionality is, in part, used to produce the actual datasource required for the listview.

So I have a choice. Multiple pages that have different lists displayed on each page but which replicate common functionality.

Or I create a single page that has the common functionality which also generates the datasource and that single page could have multiple listviews but then attach/bind the datasource to just one of the listviews. That would mean that there are some other listviews on the page that end up being unused. Would this cause an overhead?

Any views or comments would be really appreciated. The main functionality and code associated with the page(s) is the common code.

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 15 Sep 2011, 07:34 AM
Hello Paul,

As long as you set Visible="false" to the unneeded listviews, they will not slow down performance on your page since in such scenarios they do not fire NeedDataSource and the consequtive Item events and do not render anything on the page.

Regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
0
Paul
Top achievements
Rank 1
answered on 15 Sep 2011, 08:44 AM
That is what I had assumed but I just wanted to check. Many thanks
Tags
ListView
Asked by
Paul
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Paul
Top achievements
Rank 1
Share this question
or