Hello
I'm binding a list (BindingList<MyEntity>) to the datagrid and have set an handler for CellUpdated event.
private void XDGPortfoliokDetail_CellUpdated(object sender, DataPresenter.Events.CellUpdatedEventArgs e) { if (e.Cell.Record.DataItem is MyEntity) { MyEntity entity = e.Cell.Record.DataItem as MyEntity; } }
However i'm getting an empty DataItem when the cell is updated. Is the data source not automatically synchronized with the datagrid?
EDIT:
I found out that i can setting BindingMode to "TwoWay" updates the source automatically.
<igDP:UnboundField Label="Some Prop" BindingPath="SomeProp" BindingMode="TwoWay" Width="55"/>
I've got a total field (in datasource) that i want to show in the datagrid and the value calculated automatically.Within the above function i'm doing the calculation on the datasource. However the calculated value field / cell doesn't get updated. The datasource entity is an auto generated poco class. I suppose i can solve my problem by implementing the INotifyPropertyChanged in the entity but this requires some work, specially if i have to change many entities.
Hello,
Thank you for your post. I have been looking into it and I can say that as you said , you have to implement INotifyPropertyChanged in order to make your Binding updates properly, because this is the function of that interface, to notify binding clients that a property value has changed.
Hope this helps you.