Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Navigate Enity by GridView
Help Please,
How do I return the edited DataRow of a GridView then use that datarow to navigate to the entity row for a webform?
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"];
// How do I return the grdSurveyDue row?
// Do I need to do a primary key find?
// If so how do I return the current row PK?
// Use the below to set the entity data row?
this.oSurveyDue.Entity.SetDataRow(??? What Row ???);
// Save the DataSet (the GridView automatically binds back)
this.Save(this.oSurveyDue, dsSurveyDue);
// Reset the edited item and rebind the GridView
this.grdSurveyDue.EditIndex = -1;
this.BindControl(this.grdSurveyDue);
}
I would appreciate any help...I have been battling this way too long.
This should be easy!?!?
Thanks, Ted
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement