Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MmGridView support paging ?
Message
From
04/12/2006 11:58:47
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01172961
Message ID:
01174635
Views:
8
Hi Paul,

Thanks for the solution facilitating paging in a GridView.

Would I need to do something like to below to set the current row via the RowIndex/PageIndex (below does not work)?

protected void grdSurveyDue_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
// Get the item to be updated
this.grdSurveyDue.EditIndex = e.RowIndex;
// Retrieve the previous SurveyDue DataSet
DataSet dsSurveyDue = (DataSet)Session["dsSurveyDue"];

// Get the DataRow, 11/29/2006 TAG include page factor (Paging not working yet)
DataRow CurrentRow = dsSurveyDue.Tables[this.oSurveyDue.TableName].Rows[e.RowIndex +
(this.grdSurveyDue.PageIndex * this.grdSurveyDue.PageSize)];

// Use the below to set the entity data row
this.oSurveyDue.Entity.SetDataRow(CurrentRow);

Thanks, Ted

>>Using the jump start example customerorders.aspx form I set AllowPaging=true, PageSize=3. I have no code in PageIndexChanging and PageIndexChanged events. The page links appear but it never pages - no errors. Does this need some addition code ?
>
>For paging, you can create a method which handles the PageIndexChanging() event of the GridView. Inside of this method, write code that does something like:
>
>
>// Replace with method(s) that retrieve your data.
>this.m_businessObject.GetAllData();
>this.grdGridView.PageIndex = e.NewPageIndex;
>this.DataBind();
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform