Multiple Column headers lines in dxDBGrid in Delphi? - delphi

Users are wanting a grid to have multiple lines in the column header, and I am not finding a solution.
Anybody have any suggestions?

Have you tried the HeaderMaxLineCount property of the TdxDBGridColumn?

Additional information:
When you use the cxGrid component from devexpress you have to set the HeaderAutoHeight property to true (of cxGridDBTableView).

Related

How to make title row of crosstab invisible

I have designed the following crosstab in my report:
Is there a way I can make the first (title) row invisible (the row that mentions ‘Sum of resultaat’ and ‘volgnumm’).
I have no clue how to achieve this…
You don't specify which version of ReportBuilder you are using, but I've had a look at my version here (Version 10) and the CrossTab component does appear quite limited in terms of customisation.
However, ReportBuilder is quite well structured and a quick look at the ppCTRend.pas file reveals that it should be possible to create your own custom renderer derived from TppCustomCrossTabRenderer (remembering to register the rendering class with a call to ppRegisterRenderer). Methods to look at would be AddTextToPage and DrawCells
I got word from Nard Moseley from digital-metaphors that it's impossible to do at this moment:
"There are no properties or events to control that. You could set the captions to empty string, but no way to delete the row entirely."

How to enable checkboxes in Virtual TreeView columns headers?

I'm using Virtual TreeView V5.0.1 (06 Sep 2012) in Delphi XE2. Setting CheckBox := True on a header column property does not enables the checkbox, so here's the question, how do I enable checkboxes on column headers?
The answer to this seemingly simple question brought a dozen of Google results that tried to hack the header drawing through OwnerDraw and painting checkboxes manually.
Where's the solution I want to share is quite simple, enable following two items in IDE:
include hoShowImages into VirtualTree.Header.Options set and toCheckSupport into VirtualTree.TreeOptions.MiscOptions set.
Then you can enable Header.Column[0].CheckBox property and see desired result.

ListGrid: Need to show icons in an editable field for a many to one relationship

My problem seems simple. But have not been able to solve till now. Any help would be appreciated.
I have a listgrid showing certain records from a datasource. One of the fields is a many to one. When I try to edit any record, I get a dropdown with all the possible values that the record can have. All fine thus far. The issue is that all the dropdown values are displayed as simple text. I wish them to be displayed as shown in this link.
The requirement is to have "A SelectItem with icons" on the listgrid.
Regards
Use ListGridField.setEditorType() to customize the editor shown for a field. This API takes a FormItem, so pass a SelectItem configured similarly to the sample you linked to.

SmartGWT: Checkbox Tree - the proper way to get selected checkbox value

SmartGWT has this property for a TreeGrid object:
employeeTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
This by default 'prepends' every nodes (including root) with checkbox.
(Just making myself clear.)
Also, I am aware of this similar solved question:
GWT tree with checkbox:How to get all checked tree items?
However, I do not seek this kind of solution..
What I'm looking for is a more efficient way, where I don't have to loop through 1000 items.
Is there any way to do this, if possible, using the widget I am using now?
If not, is there any other way, using other widget?
Thank you very much!
I think as you use SelectionAppearance.CHECKBOX you tell to the grid that the selected records are marked by the checkbox field value. So every time you check one you select a record.
You can get the set of selected records by either getSelection() method or getSelectedRecords(boolean) because of deprecation of the previuous one.
You can have a look at the code of this example of the smartgwt showcase.

How can I setup TListView with CheckBoxes in only certain columns?

I'm using Delphi 2010, and I am trying to allow the user to select between 2 options per row in a TListView. With TListView, I can set the style to vsReport and enable Checkboxes, but that only gets me 1 checkbox per row. What I need is 2 checkboxes per row...specifically 1 for the 1st column and 1 for the 2nd column.
What I am trying to accomplish is very similar to the standard Windows file security dialog:
Does anyone have any suggestions for implementing something like this using TListView or even MustangPeak's TEasyListView?
Take a look at this
Put a TCheckBox inside a TStringGrid in Delphi
update
The link shows how to draw checkboxes. You can do the same using TListView.OnCustomDrawItem and/or OnCustomDrawSubItem events
I use my own modified version of ExGridView by Roman Mochalov, and full sources for my modified version, plus a demo here (open the Demo in the Demo2 folder) showing checkboxes.

Resources