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
1034
WinGrid Does not calculate the Formula
posted

 Hello,

 If I want to add the formula Dynamically without using the Formula builder it does not calculate the Formula. I am using the latest version of the product, that is 8.3. I wonder if there is a hotfix or I am doing anything wrong.

 Here is what I am doing:

I added a WinGrid on a form then added these codes:

 

//To fiil the first column when loaded

        private void Form1_Load(object sender, EventArgs e)
        {
            DataTable table = new DataTable();
            table.Columns.Add("Age", typeof(int));
            this.ultraGrid1.DataSource = table;

            DataRow row = table.NewRow();
            row["Age"] = 12;
            table.Rows.Add(row);
            row = table.NewRow();
            row["Age"] = 13;
            table.Rows.Add(row);
            row = table.NewRow();
            row["Age"] = 14;
            table.Rows.Add(row);
            row = table.NewRow();
            row["Age"] = 15;
            table.Rows.Add(row);

//add a caculated UnBound column

            UltraGridColumn newColumn = this.ultraGrid1.DisplayLayout.Bands[0].Columns.Add( "Age2");
            newColumn.Formula = "[Age]*2";

        }

 

It adds the column but without any data.