Note that there are some explanatory texts on larger screens.

plurals
  1. POAn unhandled exception of type 'System.StackOverflowException' occurred in mscorlib.dll error occurred?
    primarykey
    data
    text
    <p>Am getting error Unbound Expression. I Created a new column &amp; Unbounded Expression on Runtime. I get a particular cell values(GetRowCellValue) from gridview and try to change that unbound expression column with new value(SetRowCellValue). But error shown whats my mistake ? Help me.</p> <p>This is my Code.</p> <pre><code>private void unbound2_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'orionSystemDataSet.Test_Product' table. You can move, or remove it, as needed. this.test_ProductTableAdapter.Fill(this.orionSystemDataSet.Test_Product); // TODO: This line of code loads data into the 'orionSystemDataSet.Test_Gridview' table. You can move, or remove it, as needed. this.test_GridviewTableAdapter.Fill(this.orionSystemDataSet.Test_Gridview); var product = repositoryItemGridLookUpEdit1.View.Columns.AddField("Type"); product.Visible = true; //create unbound column in form load unboundcreate(); } private void unboundcreate() { gridControl1.ForceInitialize(); GridColumn unbColumn = gridView1.Columns.AddField("PriceQuantity"); unbColumn.Caption = "PricQuan"; unbColumn.VisibleIndex = gridView1.Columns.Count; unbColumn.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; unbColumn.OptionsColumn.AllowEdit = false; unbColumn.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; unbColumn.DisplayFormat.FormatString = "c"; unbColumn.AppearanceCell.BackColor = Color.LemonChiffon; unbColumn.UnboundType = DevExpress.Data.UnboundColumnType.Decimal; unbColumn.UnboundExpression = "[Quantity] * [Each]"; } </code></pre> <p>Code to get value &amp; set value</p> <pre><code> private void gridView1_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e) { GridView view = sender as GridView; if (e.Column.FieldName == "PriceQuantity" &amp;&amp; e.IsGetData) { //e.Value = getTotalValue(view, e.ListSourceRowIndex); calfun(); } else { // nothing } } private void calfun() { if (gridView1.FocusedRowHandle &gt;= 1) { string temp = "Discount"; //string dis = TXE_Gettype.Text.ToString(); object objec = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["Type"]); string dis = objec.ToString(); if (dis == temp) { object obj = gridView1.GetRowCellValue(gridView1.FocusedRowHandle - 1, gridView1.Columns["Each"]); int aa = Convert.ToInt32(obj); //textEdit1.Text = aa.ToString(); object obj1 = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["Each"]); int a = Convert.ToInt32(obj1); int b = aa; int c = a * b; //textEdit2.Text = c.ToString(); gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["PriceQuantity"], c); } } else { } } </code></pre> <p>Help me Please I want to get &amp; set value</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload