cxgrid column customization

Posted on 2010-11-23
Last Modified: 2012-05-10
How do I show the popup window to drag and drop columns, on runtime?
Question by:danz67
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
LVL 37

Expert Comment

by:Geert Gruwez
ID: 34197364
set customization to true
this will set enable a small button in the top left of the header
allowing you to hide/show columns

ColumnsMoving is to allow the columns to be reordered

Author Comment

ID: 34197731
I know this already, I am interested in seeing the window as the image attached, via runtime code
LVL 37

Expert Comment

by:Geert Gruwez
ID: 34197768
is it the grid popup menu / field chooser window you are referencing to ?
> add a cxGridPopupMenu
> set always fire on popup = true
> set grid to your grid

> right click on title column, field chooser
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 34197878
we're almost there, I saw that what I'm interested and Field Chooser, how do I open it at runtime?

Author Comment

ID: 34200270
no solution???
LVL 37

Expert Comment

by:Geert Gruwez
ID: 34201565
use the way i described
and a cxGridPopUpMenu
and in those properties set grid to your grid

setting AllwaysFireOnPopup can also help

at runtime you right click on a column header and then select field chooser

Author Comment

ID: 34203266
I had already done this and understood, it is possible to display "field chooser" directly from code inside a button and not by right-clicking on the column?
LVL 37

Expert Comment

by:Geert Gruwez
ID: 34203273
probably, i'd have to look in the source
hang on

Author Comment

ID: 34203366
ok, i wait, thanks
LVL 37

Accepted Solution

Geert Gruwez earned 100 total points
ID: 34204123
uh, finally got it
with a little magic:
uses cxGridPopupMenu;

  TcxGridPopupMenuHelper = class(TcxGridPopupMenu) end;

procedure TForm1.Button1Click(Sender: TObject);

Open in new window


Author Closing Comment

ID: 34204233
you really are a magician

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor ( Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question