Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MmGridView support paging ?
Message
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:
01175446
Views:
6
Ted,

>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);

I'll jump in here for Paul. How you handle the RowUpdating event depends on how you are retrieving items to display in the GridView. If you are retrieving all items and only displaying one page at a time, then you would need to determine the correct DataRow position by calculating the current RowIndex, PageIndex, and PageSize as you are doing above. If you are only displaying a subset of rows for each page, then you can just use the RowIndex directly to determine the correct DataRow to update.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform