Create column on execute time in TcxGrid like tDbGrid in delphi

Rapunzo picture Rapunzo · Mar 22, 2010 · Viewed 15.7k times · Source

I use TcxGrid But I cant create fields on execution time because I have a pivot query and columns are variable

Can I fill cxGrid like tDbGrid?

Answer

johnny picture johnny · Mar 23, 2010

I like to use the TcxGrid.DataController.CreateAllItems method which creates all columns that exists in the datasource. It takes a boolean parameter with which you can decide wether to add all columns or only those missing.