Posted on Jun 24, 2011 (permalink)
int
TotalItemCount;
protected
void
RadGrid1_ItemCreated(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridPagerItem)
GridPagerItem pagerItem = (GridPagerItem)e.Item;
RadComboBox PageSizeCombo = (RadComboBox)pagerItem.FindControl(
"PageSizeComboBox"
);
RadComboBoxItem item1 =
new
RadComboBoxItem();
item1 =
RadComboBoxItem(
"Show All"
, TotalItemCount.ToString());
item1.Attributes.Add(
"ownerTableViewId"
, e.Item.OwnerTableView.ClientID);
PageSizeCombo.Items.Add(item1);
}
RadGrid1_ItemEvent(
sender, GridItemEventArgs e)
(e.EventInfo
GridInitializePagerItem)
TotalItemCount = (e.EventInfo
as
GridInitializePagerItem).PagingManager.DataSourceCount;
<
telerik:RadGrid
ID
=
"RadGrid1"
AllowPaging
"true"
PageSize
"5"
runat
"server"
>
MasterTableView
PagerStyle
AlwaysVisible
/>
. . . .
</
Back to Top
UI controls for ASP.NET AJAX, MVC, WPF, Silverlight, Windows Forms and Windows Phone. Visual Studio productivity tools. Reporting and data layer solutions.
HTML5 / JavaScript tools for Web and Mobile applications
Functional, Performance, Load and Mobile Software Testing
CMS, Mobile Web, Ecommerce, Emarketing, Social Media
Project management software inspired by Agile best practices
It seems you haven't bookmarked any pages. Fix that by clicking the button below