Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataGrid PagerStyle

Status
Not open for further replies.

tembalena

Programmer
Apr 17, 2001
37
ZA
Hi, does anyone know how to set a text label for a datagrid pagerstyle, eg. I have the following outputted for numeric paging:
1 2 3 4
and I want the following 'Page:' label before the page values:
Page: 1 2 3 4

Thanks for any help.
 
Use the ItemCreated event


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Sure...
Code:
    Private Sub MyDataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles MyDataGrid.ItemCreated
        If e.Item.ItemType = ListItemType.Pager Then
            Dim lit As New Literal
            lit.Text = "Page: "
            e.Item.Cells(0).Controls.AddAt(0, lit)
        End If
    End Sub


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top