Grid Control Examples

The following sample applications demonstrate the powerful features that are available with Codejock Grid Control components.

Each sample is provided as a stand alone executable that can be easily downloaded. All samples are included with our products and are provided with complete source code.


Grid Sample

The Grid Sample demonstrates how to use almost all of the features available in the Grid control. You will see how to add rows, change column header style, add icons to items, group row, hide\show the group box, freeze columns, change grid line style, enable multiple selection of rows, add multi-line items, integrate a field chooser, use a filter to display specific rows, colorize items, display the Grid in tree view, print the Grid, display preview rows, add buttons and combo boxes to an item, focus entire row or individual item on click, and many more.

Sample Uses:
Grid Control, Command Bars, Calendar, Ribbon (Command Bars)

GridSample.zip
 Size: 10.47 Mb

Grid Sample

Track Control

The Track Control Sample demonstrates using the Grid Control and Track Control together as featured in this sample.

Sample Uses:
Grid Control

TrackControl.zip
 Size: 7.98 Mb

Track Sample

Add Record Example

The Add Record Ex sample demonstrates how to use the AddRecordEx method which is used to add records "on the fly". The advantage of AddRecordEx is rows will be updated without the need to call Populate. This makes it extremely fast and easy to update a single row. This is useful for doing tasks such as changing a checkbox. Doing this will also retain the collapsed state of groups, which Populate will reset.

Sample Uses:
Grid Control, Command Bars

GridAddRecordEx.zip
 Size: 2.35 Mb

Add Record

Custom Draw Grid

The Custom Draw sample demonstrates how to implement custom controls into Grid cells such as a progressbar, check box, or option button.

Sample Uses:
Grid Control, Command Bars

CustomDrawGrid.zip
 Size: 2.35 Mb

Custom Draw

Data Binding

The Grid Data Binding sample demonstrates how to bind the control data to a source such as an Access Database, Excel files, and dBASE files. The sample shows how to load a database and bind the Grid data to the database. Several different connection methods are provided as well as some sample databases if needed.

Sample Uses:
Grid Control

GridDataBinding.zip
 Size: 2.47 Mb

Data Binding

Spread Sheet

The Spreadsheet sample demonstrates how to easily configure the Grid Control using standard features to create a Microsoft Excel style spreadsheet.

Sample Uses:
Grid Control

SpreadsheetSample.zip
 Size: 3.53 Mb

Grid Sample

Grid Item Controls

The Grid Item Controls sample demonstrates how to add controls to an item\cell such as a button.

Sample Uses:
Grid Control

GridItemControls.zip
 Size: 2.35 Mb

Item Controls

Custom Heap

The Grid Custom Heap sample demonstrates how to better manage memory in the Grid control. Repeatedly adding and deleting a large number of records can cause the system not to free up memory. Using the Grid Control's custom memory manager eliminates any memory management problems and allows any number of records to be freely added or deleted without consuming more and more resources.

Sample Uses:
Grid Control

GridCustomHeap.zip
 Size: 2.39 Mb

Custom Heap

Grid Dialog

The Grid Dialog sample demonstrates how to add a Grid control to a MFC dialog. You will see all that is needed is to add a Custom Control with the class set to XTPReport.

Sample Uses:
Grid Control, Controls

GridDialog.zip
 Size: 2.37 Mb

Grid Dialog

Grid Virtual List

This sample demonstrates how to use Grid control for displaying a large volume of data without loading all data into the control. The concept of virtual content implies that only data to be displayed should be loaded and provided to the control in a user friendly representation. This not only prevents from major performance related issues but also helps to keep application memory consumption low.

Sample Uses:
Grid Control, CommandBars

VirtualList.zip
 Size: 2.81 Mb

Virtual List