Dapfor grid manual
2.3.2
MFC Grid enables you to create complex, well-designed applications with just a few lines of code. This RAD (Rapid application development) and threadsafe component supports
MVC pattern and works with arbitrary C++ objects that are directly inserted into rows. These objects can be updated, sorted, filtered and highlighted in real time with incredible speed.
The CGrid extends the MFC library and allows to display objects of arbitrary classes. These objects are displayed in CGrid by the binding mechanism implemented in the Common::CDataObject class. The rows of CGrid correspond to objects of arbitrary classes and columns correspond to their functions.
The CGrid was designed to work in a heavy multi-threaded environment. Almost all functions are thread-safe. The grid offers different modes for proper work in multi-threaded applications.
Since version 2.1.0, the MFC Grid is released under the license 2.0. Please refer the terms and conditions of the license here.
The CGrid is compiled on the next compilers:
- VC 6.0 SP 6
- VC 8.0 SP 1
- VC 9.0
There are 12 possible configurations of MFC Grid libraries for each compiler:
Build version |
Dapfor libraries |
Character set |
MFC libraries |
Runtime libraries |
VC 6.0 library |
VC 8.0 library |
VC 9.0 library |
Debug |
static |
Not set |
static |
/MTd |
Dapfor.Grid60ds.lib |
Dapfor.Grid80ds.lib |
Dapfor.Grid90ds.lib |
Release |
static |
Not set |
static |
/MT |
Dapfor.Grid60s.lib |
Dapfor.Grid80s.lib |
Dapfor.Grid90s.lib |
Debug |
static |
Unicode |
static |
/MTd |
Dapfor.Grid60uds.lib |
Dapfor.Grid80uds.lib |
Dapfor.Grid90uds.lib |
Release |
static |
Unicode |
static |
/MT |
Dapfor.Grid60us.lib |
Dapfor.Grid80us.lib |
Dapfor.Grid90us.lib |
Debug |
static |
Not set |
dynamic |
/MDd |
Dapfor.Grid60dss.lib |
Dapfor.Grid80dss.lib |
Dapfor.Grid90dss.lib |
Release |
static |
Not set |
dynamic |
/MD |
Dapfor.Grid60ss.lib |
Dapfor.Grid80ss.lib |
Dapfor.Grid90ss.lib |
Debug |
static |
Unicode |
dynamic |
/MDd |
Dapfor.Grid60udss.lib |
Dapfor.Grid80udss.lib |
Dapfor.Grid90udss.lib |
Release |
static |
Unicode |
dynamic |
/MD |
Dapfor.Grid60uss.lib |
Dapfor.Grid80uss.lib |
Dapfor.Grid90uss.lib |
Debug |
dynamic |
Not set |
dynamic |
/MDd |
Dapfor.Grid60d.libDapfor.Grid60d.dll |
Dapfor.Grid80d.libDapfor.Grid80d.dll |
Dapfor.Grid90d.libDapfor.Grid90d.dll |
Release |
dynamic |
Not set |
dynamic |
/MD |
Dapfor.Grid60.libDapfor.Grid60.dll |
Dapfor.Grid80.libDapfor.Grid80.dll |
Dapfor.Grid90.libDapfor.Grid90.dll |
Debug |
dynamic |
Unicode |
dynamic |
/MDd |
Dapfor.Grid60ud.libDapfor.Grid60ud.dll |
Dapfor.Grid80ud.libDapfor.Grid80ud.dll |
Dapfor.Grid90ud.libDapfor.Grid90ud.dll |
Release |
dynamic |
Unicode |
dynamic |
/MD |
Dapfor.Grid60u.libDapfor.Grid60u.dll |
Dapfor.Grid80u.libDapfor.Grid80u.dll |
Dapfor.Grid90u.libDapfor.Grid90u.dll |
Main features: Main features of MFC Grid:
- Model-View-Controller (MVC) pattern support.
- C++ objects in rows. In cells - values, returned by methods of these objects.
- Hierarchical data presentation.
- Auto sorting of dynamically updating C++ objects.
- Auto filtering of C++ objects at their inserting or updating.
- Auto highlighting. No timers needed to highlight cells.
- Multiple sorting via data hierarchies.
- MFC grid compares values returned by C++ objects and not strings shown in cells -> the rows are ordered correctly.
- High insertion speed > 150 000 rows/second.
- High removing speed > 120 000 rows/second.
- High comparing speed > 5000 sorts a grid of 3000 rows per second.
- High updating speed with highlighting > 50 000 cells/second.
- Sharing the same C++ objects between multiple grids -> all modifications are replicated everywhere.
- Full thread safety. The C++ objects may notify the grid from any thread.
- Dead-lock free asynchronous patterns.
- Any MFC controls in cells. The grid handles their visibility and placement automatically.
- Edit in place. The MFC grid puts the results directly into the C++ objects.
- Navigation between editable cells (Tab, KeyUp, KeyDown etc.)
- Fixed rows.
- Fixed columns.
- Resizing rows and columns.
- Filtering rows and columns.
- Flicker-free drawing.
- Background 32-bit color image.
- 32-bit color images in cells.
- Full customization (colors, fonts, alpha-blending and drawing in the CDC).
- Selection does not hide background colors.
- Copy/Edit/Paste. Copy data to Excel/Word. High speed, low memory consumption.
- Drag and drop support. Drag and drop of a hierarchical data. Drop data to Word/Excel.
- Tooltips show remaining text over partially visible cells.
- No memory leaks.
- No GDI resource leaks.
- Low memory and CPU consumption. No more huge arrays of strings that load memory and CPU.
- Fault-tolerant design.
- RAD (Rapid application development) design.
- Serialization with versions support. New versions of the MFC grid will be compatible with previous ones.
- Print and print preview.
- MFC Grid may by used in dialogs, MDI/SDI applications.
- Available in static or dynamic libraries with or without Unicode support.
Below you will find more details about the grid, some explanations, examples and best practices that you can apply in your projects.
FAQ and Code examples is a knoweledge base that helps you in your work with the MFC Grid.