I do not want to add a database field in my actual database to use for selection purpose so I thought to use cxGrid's ability to add a separate field in the grid. I add the field,name it (select),change it's property to that of 'checkbox' but it seems I cant use it as it is not selectable in the grid. It behaves like read-only. How can I enable such thing ? Also,how do you later manipulate with such selected record in the grid ? (example: I want to insert that selected record under another date).
Asked
Active
Viewed 1.3k times
3
-
Which dataset are you using. Some datasets can use temporary field. This field is not related with the database. – Ravaut123 Nov 04 '13 at 11:59
-
If you're asking whether you can have a read/write checkbox column that's not bound to a data column, it certainly used to be (in the days of version 3 of Devex's Quantum Grid) and somewhere or other I found their documentation on how to do it. Unfortunately, i haven't managed to find it just now. ISTR that it was a question of adding (in code) an unbound TdxTreeList check column to the grid (reason I remember was that I was surprised the QG allowed an unbound column to a data-bound grid) and then handling the OnMouseUp event to toggle the state of the check box. Was 10 years ago, though ... – MartynA Nov 04 '13 at 12:57
-
Btw, I also STR that the point of using an unbound column was that it allowed the checkbox's state to be independent of the data in the dataset. Similar to what @Ravault123 mentioned, I guess, but implemented differently. – MartynA Nov 04 '13 at 13:02
-
using sqlite with Unidac. – user763539 Nov 04 '13 at 13:06
-
Add new field as fkInternalCalc into the DataSet of unidac (TFDTable). Also set the Tcxgrid.TcxGridDBTableView.DataController.DataModeController.GridMode to True. – Ravaut123 Nov 04 '13 at 15:26
2 Answers
4
A few things you need to do. 1. Set the new field's ValueType property. 2. Set the DataController.KeyFieldName property.
See https://www.devexpress.com/Support/Center/Question/Details/A1095 for step-by-step instructions from DevExpress.

Sam M
- 4,136
- 4
- 29
- 42
-1
Click checkbox column
->databinding
->valuetype
,
Change the valuetype
to boolean
Hope it helps.
-
-
Add this comment to the answer because one liner answer are expected to delete soon and also explain how it will be useful to other future readers. – Parth Pandya Jul 25 '18 at 06:16