We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DataTable Expression Column

Thread ID:




15767 Jun 27,2004 02:32 PM UTC WinForms 0
Tags: FAQ
pankaj banga
Asked On June 27, 2004 02:32 PM UTC

My DataGrid is bound to a DataSet, with following columns: Description, CashExp, CreditExp,Frequency On run time, I am adding two new DataColumn “AnnualCash” and “AnnualCredit” and defining Expression property to give product of two columns, as follows Dim dc As DataColumn dc = New DataColumn("AnnualCash", GetType(System.Single)) dc.Expression = " CashExp * Frequency" myDataSet.Tables("ClientExpenses").Columns.Add(dc) dc = New DataColumn("AnnualCredit", GetType(System.Single)) dc.Expression = " CreditExp * Frequency" myDataSet.Tables("ClientExpenses").Columns.Add(dc) The only problem I am getting is when CashExp or CreditExp or Frequency is changed the value of derived column is not changed (calculated) until user changes the row either by tab or arrow keys. How can I change this behaviour so that the derived columns gets calculated when user edit values in a cell.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon