>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)
{
if ( e.Item.ItemType == ListItemType.Pager ) // Is it the pager?
{
TableCell pager = (TableCell)e.Item.Controls[0];
Label lblNumRecords = new Label();
lblNumRecords.ID = "lblNumRecords";
lblNumRecords.Text = "Viewing Page #:";
lblNumRecords.ForeColor = Color.Blue;
pager.Controls.AddAt(0,lblNumRecords);
}
}
Cetin