Hi,
I've bind my Grid with a business object of type table (it has one primary key also). I've also taken a button and set it's action as "Server Operation". On the server Operation I've written a Code Activity with the following lines to do some manipulation with the dataset and then bind this dataset to the Grid. I don't understand why the Grid is not updating.. Please find the code below for reference..
DataSet ds = this.Current.boq_GridData1.Read();
DataView dv = new DataView(ds.Tables[0]);
dv.AllowEdit = true;
int currentRow = Convert.ToInt32(Local.txtCurrentRowSelected.ToString());
if(currentRow > 0)
{
int old = Convert.ToInt32(dv.Table.Rows[currentRow - 1]["ID"]);
dv.Table.Rows[currentRow - 1]["ID"] = Convert.ToInt32(dv.Table.Rows[currentRow]["ID"]);
dv.Table.Rows[currentRow]["ID"] = old;
}
dv.Sort = "ID";
DataTable dt = dv.Table.Clone();
foreach (DataRowView drv in dv)
dt.ImportRow(drv.Row);
DataSet dsnew = new DataSet();
dsnew.Tables.Add(dt);
this.Current.boq_GridData1.Write(dsnew);