Datagrid paging problem

Results 1 to 2 of 2

Thread: Datagrid paging problem

  1. #1
    Join Date
    Dec 1969

    Default Datagrid paging problem

    I am using a datagrid to display number of records. I want to display 10 records on each page. I want to display the page number on the datagrid. How to implement paging in this scenario. The data type of the primary key is Char(5). <BR><BR>The paging is working fine when the primary key is integer.

  2. #2
    Join Date
    Dec 1969

    Default RE: Datagrid paging problem

    I don&#039;t think there should be any relation with the primary key being iteger or char. Since the records are there in the grid, it should be able to do the paging.<BR><BR>See if this code be of any help:<BR><BR>Sub dropPage_SelectedIndexChanged(sender As Object, e As System.EventArgs)<BR> dgrdUsers.CurrentPageIndex = 0<BR> dgrdUsers.Datasource = BindDataGrid()<BR> dgrdUsers.DataBind()<BR> End Sub<BR><BR><BR>&#060;asp:DataGrid id="dgrdUsers" GridLines="Horizontal" AutoGeneratecolumns="False" width="100%" AllowPaging="True" AllowCustomPaging="False" PageSize="10" PagerStyle-Mode="Numeric" PagerStyle-Font-Bold="True" OnPageIndexChanged="dgrdUsers_PageIndexChanged" AlternatingItemStyle-Backcolor="AliceBlue" Cellpadding="4" HeaderStyle-Font-Bold="True" runat="server"&#062;<BR><BR><BR>Good Luck with your code!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts