Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid Paging - Display
Message
From
22/06/2005 12:39:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/06/2005 19:10:56
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows 2000 SP4
Database:
MS SQL Server
Miscellaneous
Thread ID:
01025307
Message ID:
01025518
Views:
19
This message has been marked as the solution to the initial question of the thread.
>VS.NET 2003
>
>On one of my WebForms I'm using a DataGrid to display database rows. I've set AllowPaging to true and PagerStyle.Mode is NumericPages. This is all working great. However, the users are complaining that it only displays a row of numbers (links) across the bottom; it's not "obvious" that these are different available pages of results. Rather than it showing just page numbers, they'd like it to say "Page " followed by the page numbers. Basically, what they have now with the word "Page" prepended.
>
>Can this be done with the DataGrid control?

Al,
This is converted and modified version of what Paul suggested.
private void myDataGrid_ItemCreated(object sender, 
    System.Web.UI.WebControls.DataGridItemEventArgs e)
{
  //Get the created item
  if ( e.Item.ItemType == ListItemType.Pager ) // Is it the pager? 
  {
	// Extract the Pager 
	TableCell pager = (TableCell)e.Item.Controls[0];

	// Add Label
	Label lblNumRecords = new Label();
	lblNumRecords.ID = "lblNumRecords";
	lblNumRecords.Text = "Viewing Page #:";
	lblNumRecords.ForeColor	= Color.Blue;
	pager.Controls.AddAt(0,lblNumRecords);
  }
}
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform