Recent

Author Topic: identifier not found "cbsCheckboxColumn"  (Read 831 times)

rnervi

  • New Member
  • *
  • Posts: 14
identifier not found "cbsCheckboxColumn"
« on: May 22, 2024, 06:53:19 am »
dbgrid1.Columns.ColumnByFieldname('select').ValueChecked := '1';
dbgrid1.Columns.ColumnByFieldname('select').valueunchecked := '0';
dbgrid1.Columns.ColumnByFieldname('select').ButtonStyle := cbsCheckboxColumn; 

cannot compile :

Error: identifier not found "cbsCheckboxColumn"

any suggestion ?

-------------------------------------------------------------

help states:

TColumnButtonStyle

Enumeration with cell editor types available in a grid control.

Declaration

Source position: grids.pas line 153

type
TColumnButtonStyle = (
  cbsAuto,
  cbsEllipsis,
  cbsNone,
  cbsPickList,
  cbsCheckboxColumn,
  cbsButton,
  cbsButtonColumn
);

Description

fpc 3.2.2
laz 3.2
win/64
« Last Edit: May 22, 2024, 07:08:16 am by rnervi »

Handoko

  • Hero Member
  • *****
  • Posts: 5376
  • My goal: build my own game engine using Lazarus
Re: identifier not found "cbsCheckboxColumn"
« Reply #1 on: May 22, 2024, 07:45:04 am »
Identifier not found error usually happens because a required unit isn't be found in the uses clause. In your case, Grids.

In your uses clause section, put Grids there.

rnervi

  • New Member
  • *
  • Posts: 14
Re: identifier not found "cbsCheckboxColumn"
« Reply #2 on: May 22, 2024, 07:48:30 am »
ops !
thought it was part of dbgrid.
compiled.
ty
#close

 

TinyPortal © 2005-2018