Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

How to remove a column

 Post Reply Post Reply
Author
Lasquibar de la Torre Venancio View Drop Down
New Member
New Member
Avatar

Joined: 28 Oct 2018
Posts: 20
Post Options Post Options   Quote Lasquibar de la Torre Venancio Quote  Post ReplyReply Direct Link To This Post Topic: How to remove a column
    Posted: 11 Mar 2019 at 8:32pm
Hi,

I'm using Delphi 10.2.3 (Tokyo), IW 15.0.17 and the last version of TMS controls.
In an application, I have in a form a table (TTIWDBAdvWebGrid) to show data obtained from a Query. Depending on the type of data to show, I need that my table have 4 or 5 columns. To do that, each time I have to show data I drop all columns and create new ones. To drop columns I use 2 different methods (for from ColCount-1 downto 0 do List.Columns.Delete;  and List.Columns.Clear), and the results are the same. The incorrect behaviour sequence is:
  1. Build the table with 4 columns --> OK
  2. Delete columns and Build the table with 5 columns --> OK
  3. Delete columns and Build the table with 4 columns --> NO OK. Shows 5 columns, and the contents of 5th column, comes from another table I have in same form.
In this last case, List.ColCount has the value of 4, even the form shows 5 columns.

Am I doing anything wrong? Could you tell me how to do to fix this problem?

Best regards,

           Venancio Lasquibar
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2157
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 12 Mar 2019 at 8:43am
Hi,

Have you tried to set the AutoAddAllFields property to False?
Back to Top
Lasquibar de la Torre Venancio View Drop Down
New Member
New Member
Avatar

Joined: 28 Oct 2018
Posts: 20
Post Options Post Options   Quote Lasquibar de la Torre Venancio Quote  Post ReplyReply Direct Link To This Post Posted: 12 Mar 2019 at 7:49pm
Hi,

Is set to false

KR,

       Venancio
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2157
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 13 Mar 2019 at 8:31am
I'm not sure what's causing the issue on your side.
Can you please check if the issue can be reproduced in a new project that only contains a TTIWAdvWebGrid component?

If so, please provide a ready to run sample project so I can review your code and further investigate this.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down