• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5347
  • Last Modified:

cxgrid column customization

hi,
How do I show the popup window to drag and drop columns, on runtime?
0
danz67
Asked:
danz67
  • 6
  • 5
1 Solution
 
Geert GruwezOracle dbaCommented:
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
cxgridOptions.png
0
 
danz67Author Commented:
I know this already, I am interested in seeing the window as the image attached, via runtime code
0
 
Geert GruwezOracle dbaCommented:
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
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
danz67Author Commented:
we're almost there, I saw that what I'm interested and Field Chooser, how do I open it at runtime?
0
 
danz67Author Commented:
no solution???
0
 
Geert GruwezOracle dbaCommented:
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
0
 
danz67Author Commented:
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?
0
 
Geert GruwezOracle dbaCommented:
probably, i'd have to look in the source
hang on
0
 
danz67Author Commented:
ok, i wait, thanks
0
 
Geert GruwezOracle dbaCommented:
uh, finally got it
with a little magic:
uses cxGridPopupMenu;

type
  TcxGridPopupMenuHelper = class(TcxGridPopupMenu) end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  TcxGridPopupMenuHelper(YourCxGridPopupMenu).GridOperationHelper.DoShowColumnCustomizing(True);
end;

Open in new window

0
 
danz67Author Commented:
you really are a magician
0

Featured Post

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!

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now