Documents
NextGrid & NextDBGrid
- Integrating Inplace Editors
- Upgrade existing projects for loading changes
- FieldChooser Tutorial
- NextGrid How To
- Html Column Tutorial
- NextGrid Slide Style Tutorial
- InputLine Tutorial
- Edit events in NextGrid
- NextGrid Vista Style
NextGrid
- NextGrid Quick Start
- Graphic Column Tutorial
- Optimize NextGrid
- Custom Draw in NextGrid
- VirtualColumn Tutorial
- NextGrid Custom Sorting
- TreeColumn Tutorial
NextDBGrid
NextInspector
- NextInspector Item Types
- NextInspector Quick Start
- NextDBInspector Tutorial
- NextInspector Advanced tutorial
- Map VCL property to item
NextSheet
NextCollection
- NxInfoPanel Tutorial
- NxPathControl and NxNotebook tutorial
- NxAlertWindow Tutorial
- NxPathControl Quick Start
- NxButton Tutorial
- NxOutlookBar Tutorial
- NxFlipPanel and NxHeaderPanel Quick Start
- NxPageControl and NxNotebook Quick Start
Misc
- DateTime FormatMask
- NxAutoCompletion Tutorial
- Using NxColorScheme
- NxComboBox styles
- Enable typing unicode characters in InplaceEditors
- NxProgress Tutorial
- NxPreview Quick Start
- Numeric FormatMask
- Component Names Change
- 32bit Bitmaps Tutorial
Labs
FieldChooser Tutorial
Related Articles:
Info
- Skill:
- Version: 1.0.1
- Author: Bojan Nikolic
- Created:
- Updated: 2008-04-26
Downloads
Developer first need to define Fields (Columns) Categories, and then place single Columns inside this Categories. Users will be able then to drag and drop hidden columns from Field Chooser back to Grid and make this Column Visible!

Each Column may be placed in single or in several Categories, or there can be only one Category with all Columns.
1. Place component of form
Field Chooser (TNxFieldChooser) component is located inside "Next Suite" Tab/Category on Components Pallete. Double click on Field Chooser icon and component will be placed on Form.
Now place one NextGrid component and point Associate property of Field Chooser to this Grid, or some other existing NextGrid. Grid and Field Chooser doesn't need to be placed on same form.
2. Set column Categories
Field Chooser require at least one Category, but sometime is usefull to have several Categories inside Field Chooser.
Each Category have own Columns Collection and own Caption. To add new Category (and set Caption in same line) write:
NxFieldChooser1.AddCategory('Frequently-used Fields');
To delete Category write:
NxFieldChooser1.DeleteCategory(CategoryIndex);
To set Category Properties, user Categories array property:
NxFieldChooser1.Categories[CategoryIndex]...
Only one Category may be active in same time, to change Active Category, set Category property:
NxFieldChooser1.Category := CategoryIndex;
3. Add Columns into Category
After we have create Category, we can now add Columns inside it. Same Column may be in several categories.
To place Column inside Category, use Add method of Category:
NxFieldChooser.Categories[CategoryIndex].Add(NextGrid1.Columns[ColumnIndex]);
or you can add Column in same pass when adding Category:
with NxFieldChooser1.AddCategory('Common Fields') do
begin
Add(NxTextColumn1);
Add(NxTextColumn2);
...
end;
To add all Columns into Category, write:
NxFieldChooser.Categories[CategoryIndex].AddAllColumns;
If Column is already Hidden and we set this Category as current Category, Column's "Box" will be show inside Field Chooser and User will be able to drag it to the Grid.
To remove column from Category, use Delete method of Category:
NxFieldChooser.Categories[CategoryIndex].Delete(Index);
Conclusion
With using FieldChooser component your users will be able to more easy customize their Grids and you no more need to create own customizers. In upcoming versions we will add possibility for customizing Column's Alignment, Size...by double clicking on Column Box inside FieldChooser.
For more details download demo project source.