To reproduce: add a RadGridView and bind it to the Northwind.Products data table. Use the following code:
private void Form1_Load(object sender, EventArgs e)
{
this.productsTableAdapter.Fill(this.nwindDataSet.Products);
RadMessageBox.Show(string.Format("TOTAL2 = {0}", NewExpression()));
}
public string NewExpression()
{
this.radGridView1.Columns.Add(new GridViewDecimalColumn("TOTAL1") { Expression = "ReorderLevel + UnitsOnOrder" });
this.radGridView1.Columns.Add(new GridViewDecimalColumn("TOTAL2") { Expression = "TOTAL1 + UnitPrice" });
//uncomment to get the value of "TOTAL2"
// var total1 = this.radGridView1.Rows[2].Cells["TOTAL1"].Value;
var total2 = this.radGridView1.Rows[2].Cells["TOTAL2"].Value;
return total2.ToString();
}
It is not possible to access the column value ("TOTAL2") before firstly to access the column "TOTAL1" value.