How to set a value to Unbound Column cell ? (SetRowCellValue) Grinview Winforms Devexpress

13,375

Unbound column get its values using the GridView's CustomUnboundColumnData event handler. Unbound column values are not preserved by the grid, they are passed to this event handler so that a developer can catch this moment and save it. Please refer to the SetRowCellValue and Unbound Column. ticket which is also devoted to this issue.

Update

Please note the following. Unbound columns are intended to allow the grid to manipulate with data (group, sort, calc summary and so on) which is not the part of the gridControl's DataSource. It means that data for an unbound column should be stored by a developer himself in any external storage. When the SetRowCellValue method is called, the CustomUnboundColumnData event is raised with the e.IsSetData attribute equal to true. In this case, the developer MUST save this data somewhere and then return it within the CustomUnboundColumnData event when the e.IsGetData equal to true. I do not see the code where you save the value. So, you defenetely need to add this code. I hope this makes sense.

Share:
13,375
Srihari
Author by

Srihari

Android Developer & Designer designing myself..

Updated on July 09, 2022

Comments

  • Srihari
    Srihari almost 2 years

    I can able to set value to Bounded Column from Db.

    Using this code

    int c = a + b;
    

    gridView1.SetRowCellValue(gridView1.FocusedRowHandle, gridView1.Columns["boundcolumn"], c);

    But I want to Set the this c value to Unbound Column. this code not working to Unbound Column. How to set value to Unbound Coulmn ?