简体   繁体   中英

vb.net devexpress datagridview add values in rows

I have Devexpress Grid control in my form, I would like to add values in rows manually, but when I entered value in cell after press enter, I see nothing in cell.

I do not understand why, do we need code for this? I dont think soo. See pic here 在此处输入图片说明

The GridControl does not maintain an internal data source and should be bound to a data source. If you do not want to provide a data source for the GridControl, you should handle the CustomUnboundColumnData event to supply the value for a cell. You can also try using the UnboundSource data component .

Reference: Add Unbound Data to a Data-Aware Control (XtraGrid, XtraPivotGrid)

In most cases data-aware DevExpress .NET controls contain bound columns/fields that display data from bound data sources. In Grid Control and PivotGrid controls, it is possible to add unbound columns/fields that can display arbitrary data. Unbound columns are not bound to any field in a data source. You can provide data for these fields by specifying a formula (string expression) used to evaluate values or by handling an event

If you want to bind data without the currently existing ready-to-use source, use the UnboundSource component as Brendon already suggested.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM