English 中文(简体)
Silverlight Datagrid RowEditEnded
原标题:

I have a SL DataGrid that has two columns. I need to be able to catch any change to the a row and save it into an undo stack. I setup the event RowEditEnded and tried to add to the undo stack there. The problem I m running into is that I have no way to get the new value from RowEditEnded. If the column is a ComboBox then it updates the binding source before RowEditEnded is thrown, but if I have just a TextBox then RowEditEnded is thrown before the datasource is updated.

Does anyone know of a way to force the DataBinding source to be updated before RowEditEnded to allow me to access the new value when the column is a template column with a textbox?

最佳回答

You will need to catch the changes in your class that is bound to since that is where the changes are being stored. The DataGrid edit mode is a state of the data grid, not the values behind it.

问题回答

暂无回答




相关问题
WPF: Adding Button Column to Datagrid

How can I add a Button column to a Datagrid programmatically? I want to do this through code in the code-behind file. Also i want to selectively enable or disable this button based on record (If ...

Silverlight Datagrid RowEditEnded

I have a SL DataGrid that has two columns. I need to be able to catch any change to the a row and save it into an undo stack. I setup the event RowEditEnded and tried to add to the undo stack there. ...

WPF Keep column sorting with Datagrid

I have several datagrid where I need to update the informations. Things is, since more than one person works on the system at the same time, the datagrid need to be refreshed on a regular basis. When ...

热门标签