-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: anoop_cm
Message 2 in Discussion
HI,
Use Custom paging. And write the data access code in a stored procedure which only
returns the
rows for the current page.
your asp code will be something of the line
--------------------------
Private Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
DataGrid1.PageIndexChanged
DataGrid1.CurrentPageIndex = e.NewPageIndex
Dim lngTotalPage As Long
Dim ds1 As DataSet = YourBusinessObject.CallYourSp(
e.NewPageIndex * DataGrid1.PageSize,
DataGrid1.PageSize, lngTotalPage)
DataGrid1.VirtualItemCount = lngTotalPage
DataGrid1.DataSource = ds1
DataGrid1.DataBind()
End Sub
--------------------------
As of now, you will have to
write this extra code in your stored proc (hint: use table datatype and identity col
to create dummy rowid and SET ROWCOUNT to limit rows fetched).
Also you should return the total rows back from the
stored procedure to set the virtualitem count property.
If you could wait for few months till the ADO.2 is out then it will do it for you.
hth
anoop c m
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]