celleditingtemplate - WPF CellEditing issue - reload datagrid rows -
i have datagrid , 1 panel. when click on row, data should appeared on panel. , when edit cell , after editing if click cell of same row, panel should updated immediately. datagrid bound through item source (data table), if make change grid (add/delete/edit) item source updated , per item source panel updated.
to achieve cell edit thing use following code , it's working.
void datagrid_celleditending(object sender, datagridcelleditendingeventargs e) { if (!ismanualeditcommit) { ismanualeditcommit = true; datagrid grid = (datagrid)sender; grid.commitedit(datagrideditingunit.row, true); ismanualeditcommit = false; } } issue: issue when line gets called (grid.commitedit), loading rows again.and if datatable big takes few sec load rows. if don't commit grid changes of datagrid appears on panel after click on row. want achieve when click on cell of same row without loading rows again.
here image

pls help
thanks
this common pitfall of datagrid : commit logic. solution found (it booleans, not numbers) make own custom datagridcolumn, bindings triggers set on propertychanged, have content updated @ once , not on commit. surely little work, datagrid standards column won't allow change commit logic.
Comments
Post a Comment