General information
Category:
The Mere Mortals .NET Framework
Title:
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only