Hey all,<BR>I read Anthony's article on Xml String/DataSet usage, and actually found a use for it in a Wizard for the site I'm creating. In Step 2, I need to put data into a DataGrid using an Xml String, and allow users to change the information, or add new items, but I don't want the actual database to be updated until the user finishes Step 4. My question is, what is the best way to go about updating the data in/adding new data to the Xml string? Right now I'm attempting to manually modify the string using the string commands, but I'd imagine there is a way to use the DataSet to regenerate the Xml. Am I correct?<BR><BR>Thank you,<BR>Joe Fiorini<BR>Lead Web Developer/Project Manager<BR>PanasonicYou are correct.<BR><BR>1. Load the Dataset with the Xml String<BR>2. Bind the Dataset to the Datagrid<BR>3. Process all inserts and updates with the Datagrid/Dataset<BR>4. Commit changes to the datastore (DB)<BR>5. If you need to persist the new XML that describes the Dataset, use the Dataset.getXML() method:<BR><BR>Returns the XML representation of the data stored in the DataSet.<BR><BR>[Visual Basic]<BR><Serializable><BR>Public Function GetXml() As String<BR>[C#]<BR>[Serializable]<BR>public string GetXml();<BR>[C++]<BR>[Serializable]<BR>public: String* GetXml();<BR>[JScript]<BR>public<BR> Serializable<BR>function GetXml() : String;<BR>Return Value<BR>A string that is a representation of the data stored in the DataSet.<BR><BR>Remarks<BR>Calling this method is identical to calling WriteXml with XmlWriteMode set to IgnoreSchema.<BR><BR>Note GetXml returns XML as a string, and therefore, requires more overhead than using WriteXml to write XML to a file.<BR>The problem is, I don't want to commit the changes made in Step 2 until Step 4, therefore I need the Xml to persist throughout the rest of the Wizard, until Step 4. Here is an implementation that I came up with, that works for now. If anyone knows a better way, please let me know.<BR><BR>Thanks,<BR>Joe Fiorini<BR><BR>This is in the UpdateCommand method of my DataGrid:<BR><BR>Private Sub dgrReviseParts_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles dgrReviseParts.UpdateCommand<BR><BR> Dim PartName As String = CType(e.Item.Cell(0).FindControl ("txtPartName"), Web.UI.WebControls.TextBox).Text<BR><BR> Dim Status As String = CType(e.Item.Cells(2).FindControl ("cmbStatus"), Web.UI.WebControls.DropDownList).SelectedItem.Valu e<BR><BR> Dim PartType As String = CType(e.Item.Cells(1).FindControl ("txtPartType"), Web.UI.WebControls.TextBox).Text<BR><BR> Dim ItemNumber As String = CType(e.Item.Cells(3).FindControl ("txtItemNumber"), Web.UI.WebControls.TextBox).Text<BR><BR> Dim sXml As String = Session("sXml")<BR><BR> Dim ds As New Data.DataSet()<BR><BR> Dim rdr As New System.IO.StringReader(sXml)<BR><BR> ds.ReadXml(rdr)<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).BeginEdit()<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).Item("PartName") = PartName<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).Item("Status") = Status<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).Item("PartType") = PartType<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).Item("ItemNumber") = ItemNumber<BR><BR> ds.Tables("Table").Rows(dgrReviseParts.EditItemIndex).EndEdit()<BR><BR> sXml = ds.GetXml<BR><BR> Session("sXml") = sXml<BR><BR> dgrReviseParts.EditItemIndex = -1<BR><BR> BindData()<BR><BR>End Function<BR><BR><BR><BR>And in my BindData() function:<BR><BR><BR><BR>Private Function BindData()<BR> Dim sXML As String<BR><BR> If Session("sXml") Is Nothing Then<BR><BR> sXML = dbActions.GetXmlFromDataSet(dbActions.GetPartsDS(, GetDrawingId))<BR><BR> Session.Add("sXml", sXML)<BR><BR> Else<BR><BR> sXML = Session("sXml")<BR><BR> End If<BR><BR> dgrReviseParts.DataSource = dbActions.GetDataSetFromXml(sXML)<BR><BR> dgrReviseParts.DataBind()<BR><BR>End FunctionSure... you can persist the XML by sticking it in a session variable, or you can persist it to a file, or to a db table... whatever.... you are on the right track!Sweet, thanks for the help!<BR><BR>-Joe