Ask Your Question
3

How can I update a specific value in each cell during the Devexpress ASPxGridView BatchUpdate using C#?

asked 2023-06-11 04:54:50 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-11 05:11:02 +0000

david gravatar image

To update a specific value in each cell during the DevExpress ASPxGridView BatchUpdate using C#, you can handle the ASPxGridView.BatchUpdate event and iterate through the ASPxGridView.DataController.VisualRowCount to update each cell. Here is an example:

protected void ASPxGridView1_BatchUpdate(object sender, DevExpress.Web.Data.ASPxDataBatchUpdateEventArgs e) { foreach (var updateValues in e.UpdateValues) { foreach (var updatedItem in updateValues.Keys) { var gridDataItem = ASPxGridView1.GetRowByKeyValue(updatedItem);

        if (gridDataItem != null)
        {
            gridDataItem["ColumnName"] = "NewValue";
        }
    }
}

}

In the above example, you need to replace "ColumnName" with the actual name of the column you want to update and "NewValue" with the new value you want to set for that column.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-11 04:54:50 +0000

Seen: 11 times

Last updated: Jun 11 '23