I have a cxgrid with data bind and I want to display an extra column that is not showing:
So I use "Customize..." from the cxgrid interface:
The column selected above, has Visible set as False, that's why is not showing yet;
FieldName: CODIGO_PRIORIDADE
ValueType: Float
I tried to set it to Visible, it doesn't appear in the grid. If I move its position to below or above, it completely breaks my grid, modifying the Name of all the Grid Column to 1 as well, example:
How can I properly set this new column to the last position of the grid based on data bind without breaking it?
CodePudding user response:
You can do the column visible using the object TFloatField
associated to field CODIGO_PRIORIDADE using:
cxGrid1DBTableView1CODIGO_PRIORIDADE.Visible := True;
To send the column "to the last position of the grid", you should do it using the visible columns of the grid, with VisibleColumnCount
property:
cxGrid1DBTableView1CODIGO_PRIORIDADE.Index := cxGrid1DBTableView1.VisibleColumnCount;