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
740
add column add 2 columns
posted

I want to add a column to my grid, but this value is the sum of the value of two different columns.

Like a cell in Excel with the formula sum ().

thanks

Parents
  • 53790
    Verified Answer
    posted

    Hi,

    Maybe one possible approach to solve this taks, could be if you are using UltraCalcManager. In my sample I have three columns . The columns C contains the SUM of columns A and B

    private void Form1_Load(object sender, EventArgs e)

    {

        ultraGrid1.CalcManager = ultraCalcManager1;

        ultraGrid1.DisplayLayout.Bands[0].Columns["C"].Formula = "sum( [//ultraGrid1/Band 0/A] , [//ultraGrid1/Band 0/B] )";

    }

    Please take a look at the attached sample for more details and let me know if you have any questions.

    Regards

     

     

    UltraGridUnboundColumnSum.zip
Reply Children
No Data