I have a web method:
public DataSet SyncedWall()
{
DataSet dst = dscomment;
dst.Tables[0].Rows[i]["WallInfo"] = "my own modified value";
return dst;
}
Although the real method is big but this is a minified version.
Following is the xml output received from the web method:
<DataSet>
<xs:schema id="NewDataSet">
<!-- Schema goes here.. -->
</xs:schema>
<diffgr:diffgram>
<NewDataSet>
<!-- Dataset values goes here... -->
</NewDataSet>
<diffgr:before>
<!-- Here are the original modified (unwanted) values -->
</diffgr:before>
</diffgr:diffgram>
</DataSet>
What I want is to remove the <diffgr:before>
tag and its inner contents.
How to do that?
Hurreeyyyyyy!!!
I've found the answer after scratching my head upto couples of hours. :P
Before returning the dataset just call for datasetObject.AcceptChanges();
and you're done.
So here is the code:
public DataSet SyncedWall()
{
DataSet dst = dscomment;
dst.Tables[0].Rows[i]["WallInfo"] = "my own modified value";
dst.AcceptChanges();
return dst;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With