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
932
How to set value of a column based on other columns!
posted

Hi,

Is it possible to write an expression that will set value of a column based on other columns in XamDataGrid?

something like Column3 = Column1.value + Column2.value / Column4.value;  This is supported on System.Data.DataColumn

http://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression.aspx

Any help is appreciated.

Thanks,

Naveen

Parents
No Data
Reply
  • 9694
    posted

    Hello Naveen,

    Check out the xamDataGrid NetAdvantage for WPF documentation and look up the "Using an Unbound Field to Display a Complex Property (XAML)" page in the Accessing Data section. Note there is a code-behind page as well (same title without the XAML ending). The page shows how to bind an Unbound Field to a property. In this example, you would do your calculations in the ObjectDataProvider action method (declared in the MethodName property). You could also do the same thing by binding to a DependencyProperty in your code-behind.

    Let me know if you need more help on this topic.

    Thanks,

Children
No Data