tags:

views:

31

answers:

1

I have one application, in that i am using a datarow object like this.

DataRow[] drRow;
                drRow = _dsmenu.Tables["tblmenu"].Select("id='" + DocID + "'");

After this i make some changes in columns like this

drRow[0]["Allow"] = "Yes";

after all the changes, i need to save that particular datarow as a xml to the db. I can do the dataset to the xml by getdataset() method. But i need to save only that particular datarow. Is it Possible? If yes please help me. thanks in advance..

A: 

I'm afraid this is not possible. I recommend you to do it this way.

    DataRow[] rows = _dsmenu.Tables["tblmenu"].Select("id='" + DocID + "'");
    rows[0]["Allow"] = "Yes";

    DataTable table = new DataTable();

    foreach (DataRow row in rows)
    {
        table.ImportRow(row);
    }

    table.WriteXml(""); // Take this into database.
this. __curious_geek