K
Krishna
hi,
I developed one web application using visual studio 2005 and created
one new webforms with datagrid control and set AllowPaging="true".But it's
not work on it
my code is below.
<aspataGrid id="testgrid" runat="server" EnableViewState="true"
Width="100%" AutoGenerateColumns="False" font-size="10pt" Font-Names="Arial"
BorderStyle="None" Gridlines="Both" DataKeyField="testId"
AllowPaging="true" PageSize="10" >
Imports System.Data
Imports System.Web.UI
Partial Class testclass
Inherits System.Web.UI.Page
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
Me.InitializeComponent()
AddHandler MyBase.Load, AddressOf Me.LoadClass
AddHandler testgrid.PageIndexChanged, AddressOf
Me.testgrid_PageIndexChanged
MyBase.OnInit(e)
End Sub
Private Sub InitializeComponent()
End Sub
how to avoid the issue?
pls help
regards
krishna
Private Sub LoadClass(ByVal Sender As Object, ByVal E As System.EventArgs)
If (Me.IsPostBack = False) Then
'bind datagrid
Me.testgrid.PagerStyle.Mode = PagerMode.NumericPages
End If
End Sub
Private Sub testgrid_PageIndexChanged(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs)
Me.timberDetails.CurrentPageIndex = e.NewPageIndex
Me.testgrid.DataSource = 'datasource'
Me.testgrid.DataBind()
End Sub
End class
I developed one web application using visual studio 2005 and created
one new webforms with datagrid control and set AllowPaging="true".But it's
not work on it
my code is below.
<aspataGrid id="testgrid" runat="server" EnableViewState="true"
Width="100%" AutoGenerateColumns="False" font-size="10pt" Font-Names="Arial"
BorderStyle="None" Gridlines="Both" DataKeyField="testId"
AllowPaging="true" PageSize="10" >
Imports System.Data
Imports System.Web.UI
Partial Class testclass
Inherits System.Web.UI.Page
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
Me.InitializeComponent()
AddHandler MyBase.Load, AddressOf Me.LoadClass
AddHandler testgrid.PageIndexChanged, AddressOf
Me.testgrid_PageIndexChanged
MyBase.OnInit(e)
End Sub
Private Sub InitializeComponent()
End Sub
how to avoid the issue?
pls help
regards
krishna
Private Sub LoadClass(ByVal Sender As Object, ByVal E As System.EventArgs)
If (Me.IsPostBack = False) Then
'bind datagrid
Me.testgrid.PagerStyle.Mode = PagerMode.NumericPages
End If
End Sub
Private Sub testgrid_PageIndexChanged(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs)
Me.timberDetails.CurrentPageIndex = e.NewPageIndex
Me.testgrid.DataSource = 'datasource'
Me.testgrid.DataBind()
End Sub
End class