Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Add Cell values to new column cell
posted

Hi,

I am using a Observable collection to bind data to grid. I need to now add a new column which is not part of the collection and is used for view purpose. The value in the cells of this column is based on total of other decimal columns.

Can anyone suggest me the best way to do this and which event to use. So that if the data is updated in any of the column the change in new column is also reflected.

Thanks

Parents
No Data
Reply
  • 69686
    Verified Answer
    posted

    Hello,

    The last column should be an UnboundField. There are couple of ways/events that you can use to keep the values synchronized. You can use EditModeEnded, CellUpdated, RecordUpdated, (InitializeRecord if you are using 9.2) depending on when you want the changes to take effect. You can also use a IMultiValueConverter which you can apply to the editor of the unbound field.

    Moreover, you can see an example of this behavior in the XamFeatureBrowser under XamDataGrid - DataBinding and Interaction - Unbound Fields.

    Hope this helps.

Children