crdbgrid1.columns.delete(i) doesn't working

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

crdbgrid1.columns.delete(i) doesn't working

Post by mariusz » Fri 25 Jul 2008 09:03

I’ve code (like below). On standard dbgrid this procedure working, but here not. Procedure finding expedient column, but doesn’t delete this.

for i := 0 to crdbgrid1.Columns.Count -1 do
if lowercase(crdbgrid1.Columns.Items.Field.FullName) = 'highlight' then begin
showmessage('jest');
crdbgrid1.Columns.Delete(i);
end;

have anyone any idea what to do?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 25 Jul 2008 12:42

Deleting a column has an effect only if columns were created in the Columns Editor. Open the Columns Editor and press the Add All Fields button.

mariusz
Posts: 62
Joined: Wed 16 Jul 2008 21:04
Location: Poland / Poznan
Contact:

Post by mariusz » Fri 25 Jul 2008 14:04

Plash wrote:Deleting a column has an effect only if columns were created in the Columns Editor.
Ok. Thx.
I'll solve my problem by Unpluging crdbgrid, then add required columns to grid and then connect grid to query!

Post Reply