0
votes

Good day

I have a problem. I have a gridview, data are collected from a view table, this table containing five columns visible and one invisible. When saving changes (visible) column does well, I do it with this code:

private void btnSaveAll_Click(object sender, EventArgs e)
{
    TABLETableAdapter.Adapter.Update(MYDATASETDataSet.TABLE);
}

Apart from saving changes in the gridview, I need to add a value that is on a label, outside the gridview and save it into all records were stored

How I can do this? I mention that I want to save the data is saved in the hidden column of gridview

I am using devexpress 13 and VS 2012

Thanks you. Please help

1

1 Answers

0
votes

Iterate through all rows and set column value

for(var ii = 0; ii < gridview.RowCount; ii++) {
  var row = gridview.GetDataRow(ii);
  row["MyColumn"] = myvalue; // <- use your value and column name here
}