Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 2.34 KB

File metadata and controls

30 lines (22 loc) · 2.34 KB

WinForms Data Grid - Update the row style immediately after changing a value in the cell editor

The example handles the EditValueChanged event to respond to changing an editor's value. The example calls the PostEditor method to save the modified value to a data source. Once the value is posted to a data source, the Data Grid control invalidates/repaints the cell. The RowCellStyle event is handled to customize row appearance settings based on a specific condition:

void gridView1_RowCellStyle(object sender, RowCellStyleEventArgs e) {
    if (!true.Equals(gridView1.GetRowCellValue(e.RowHandle, "UseStyles")))
        return;
    e.Appearance.BackColor = GetRowBackColor(e.RowHandle);
}

Files to Review

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)