.net - Datagridview on RowLeave not assigning proper values to booleans -
Text after "div class =" itemprop = "text">
I have a DataViewGrid that is populated with a DataTable in a query for a DB. If the Row_Leave is trying to capture the event, then I could update it properly, I can not capture the latest value in boolean columns.
I just update a text field, when I use the underlying data source I have entered the latest value I, if I buy using boolean, I get the previous value
I'll reach the rows like this:.
if (allCorrect) {if ((DataRowView) dgView.Rows [e.RowIndex] .DataBoundItem) .IsNew {this.InsertEntry (DataRow) ((DataRowView) dgView.Rows [E.RowIndex] .DataBoundItem) .row); } Else {this.UpdateEntry ((DataRow) ((DataRowView) dgView.Rows [e.RowIndex] .DataBoundItem) .row); }}
(A fairly complex way to reach the underlying row, but works just like reaching the DGV's data source, so this is not the problem.)
< P> Any ideas?Edit : I restricted this issue to a proper event call. It seems that Row Lev is Endel The edit is called before and even CellValueChanged . Therefore, the row never gets updated to update status (to DB) and does not do this. Can I change the order of these events (to work properly)? I came to know that it was to be transformed into an orcus, but they never did.
OK, it found an alternative solution.
After checking that it needs to be updated with:
if (! (DgView.IsCurrentCellDirty)) {return; }
I commit a CommitEdit to apply changes to the cell with dgView (from which any event is still upside down due to a bug is not). CommitEdit (0);
And when the update / enter, the row will get the newest value.
Comments
Post a Comment