Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmRadGrid Row Updates
I am really struggling with row updates using the mmRadGrid. I have used the following code as provided in the MM Developer’s Guide as a starting point:
protected void MmRadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
{
// Get the item to be updated
this.MmRadGrid1.ItemIndex = e.Item.ItemIndex;
// Retrieve the previous Order Detail DataSet
DataSet dsOrderDetail = (DataSet)Session["dsOrderDetail"];
// Save the DataSet (the GridView automatically binds back)
this.Save(this.oOrderDetail, dsOrderDetail);
// Reset the edited item and rebind the GridView
this.MmRadGrid1.ItemIndex = -1;
}
I am having a problem with the save line. The save attempts to save the data to the database, but I do not have a primary key defined for the parent record because I do not want to save the parent business object at this time. All I want to do is update the child object’s dataset using some of that automagically binding stuff. Is there a way to replace the save method with a method that just updates the dataset and automatically binds the data from the grid? I will save the parent and child data later when the user clicks a different button.
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