C# – DataGrid refresh after cell edit

cdatagridwpf

I've seen many similar questions regarding the DataGrid, but nothing that directly addresses my situation.

I need to manually refresh my DataGrid after a cell has been edited. The problem is that I cannot figure out when a cell is finished editing. The DataGrid only has a CellEditEnding event (though in SilverLight they provide a CellEditEnded). Calling Refresh() on my collection view while in CellEditEnding throws an error saying that it's not allowed while a cell is being edited.

I need to refresh the entire grid because values in other rows may depend upon the value that was edited.

Best Answer

If you are referring to the System.Windows.Forms.DataGridView then there is a "CellEndEdit" event or a "CellLeave" or a "CellValueChange" events.

If not please do specify exacly what control you are refering to... WinForm or asp...

Related Topic