Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid Paging - Display
Message
De
22/06/2005 12:39:36
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
21/06/2005 19:10:56
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
OS:
Windows 2000 SP4
Database:
MS SQL Server
Divers
Thread ID:
01025307
Message ID:
01025518
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform