Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

The Ultimate Grid Home Page

0.00/5 (No votes)
14 Sep 2013 91  
The Ultimate Grid is now Open Source

Introduction

Welcome!

We are very happy to announce that we have made the decision to offer our commercial lineup of MFC libraries, including Ultimate Toolbox, Ultimate Grid, and Ultimate TCP/IP to the CodeProject.com community free of charge.

These are the full and complete libraries including source code, documentation, samples and examples.

Ultimate Toolbox, Ultimate Grid and Ultimate TCP/IP come with full source code, and are compatible with Microsoft Visual Studio versions 6.0 through 2005.

The Ultimate Toolbox and line of related MFC libraries products have been powering professional MFC applications for more than 10 years. We realize that there is a very large number of users who are still coding new applications in Visual C++ and MFC and who are looking for effective and proven libraries to enhance their applications, as well as those with legacy code to maintain and update.

By releasing these long standing MFC libraries to the CodeProject.com community we hope that the libraries will continue to grow, evolve and provide a library of useful controls to the development community through the auspices of The Code Project and its members.

Contents

Ultimate Grid Features

Ultimate Customization

Ultimate Grid 2005 was built with flexibility in mind, and provides a framework that allows you to replace many of the Grid's components at any time. The customization of Ultimate Grid 2005 is made as simple as possible. We know that each application requires different functionality, and very often our users customize (or develop new) classes for user interaction (e.g. cell types, edit controls, and data access classes).

Some examples of the flexibility of Ultimate Grid configuration:

Cell Borders

Focus Rectangles

Multi Selection styles

XP Themes

Excel Style

Scrolling

Scrolling functionality is vital to all grid components, and this is where you will notice the superiority of the Ultimate Grid. We can scroll through thousands of rows per second, or through as few as one or two. You also have the ability to programmatically scroll Ultimate Grid's view to a specific cell.

Performance

Along with the optimized scrolling performance of the Ultimate Grid, the design of the Ultimate Grid also allows you to very effectively make changes to grid's data and display, allowing it to perform well with real time data.

Datasources and Cell Types

Ultimate Grid separates the data and its visual representation through use of datasource and cell type classes. This allows you to easily represent the same data in different forms. The Ultimate Grid comes with number of pre-built datasources (ADO, DAO, ODBC, etc) which allow you to easily connect to a database. The software also comes with a variety of cell types (droplist controls, spin buttons, check boxes, etc) which allow you to easily customize user's experience with your data. And if any of our classes do not fit your needs it is very simple to create the piece that you do need.


Cell Types...


... and more Cell Types

Editing

The Ultimate Grid design not only allows you to edit any cell in the grid, (naturally, with you controlling which cells can and cannot be edited through either use of a Read Only flag or through overriding a virtual function), but it also allows you to edit each cell using a different edit control (i.e.: numeric edit control, mask edit control, custom edit control, etc).

Context Sensitive Help

If your application is using context-sensitive help and a user hits F1 (or any other form of context sensitive help activation) then the Ultimate Grid will provide you with a notification specifying which cell the user is asking help on. At that point all that is required is for you to return the relevant help ID and the grid will take care of the rest.

The Drag-and-Drop and Copy-Paste Functionality

The Ultimate Grid provides ability for its data to be shared with other grids or applications through drag-and-drop and Copy-Paste functionality.

Small Footprint

One of the most exciting qualities of Ultimate Grid 2005 is its surprisingly small footprint. It consumes very little memory (e.g. as little as 100k), which is exceptional considering the number of features that it has.

Articles

Here are a few articles to get started with - these touch on some of the major points of interest in using the Ultimate Grid in your projects. More info can be gleaned from the class references in the compiled HTML documentation, as well as the samples and demo source code.

Beginner's Guide The Beginner's Guide to the Ultimate Grid, intended as a quick overview on using the grid in the most common scenarios.
Editing Editing cell contents in the grid, covering basic editing calls and notifications as well as an introduction to advanced editing options.
Cell Types Explains how celltypes are used, lists those available 'out of the box', and provides a short introduction to creating custom celltypes for use in the grid.
DataSources Explains the basics of the datasource concept, lists the available pre-built datasources, and provides an introduction to providing your own CUGDataSource based class for use in the grid.
FAQ A selection of frequently asked questions submitted by users of the Ultimate Grid.

Configuration

Layout

We've split up the components of the Ultimate Grid into separate ZIP files, to make updates easier.

In general, for a code library such as the Ultimate Grid, installation files are a cumbersome nuisance. While they do allow the formality of license agreement acceptance, and are expected of a commercial offering, for our purposes it would be too much trouble to update an entire install in order to accommodate a small update to a core source file or sample.

The samples and library projects all reference relative paths with respect to source and include files, and should compile 'out of the box' if the .zip files are extracted to a common directory - your installation should look more or less like this:

Note - we've bundled the DataSources directory with the Samples zip - this directory contains the source code for each of the custom datasources (ADO, ODBC etc) that ship with the grid, as well as related samples.

Getting Started

Getting started with the Ultimate Grid is as simple as adding a few files to your MFC project and filling in some initial setup information. You can view the Beginner's Guide on line, as well as examine the tutorials in the chm format documentation download.

We've also added on line articles discussing editing, cell types, and using custom datasources with the Ultimate Grid.

Community Support

Support for the products will be community based, and will include participation from core developers of the products, long standing and informed users of the products, and other members of the CodeProject.com community

Licensing

It is our intention that you be able to use the libraries in any manner you wish however specific details of licensing rights, limitation of liability, and other details are included both here, and in a license.txt file included with the downloadable packages

History

Ultimate Grid 7.3

  • Rolls up all existing updates to UG into a new official release
  • Adds VC2008, VC2010 and VC2012 projects and solutions

August 2007 - Ultimate Grid 7.2 becomes the initial CodeProject release.

Ultimate Grid 7.2

  • An update to the XML classes (courtesy user kvt)
  • Addition of AllExamples and AllDemos projects.
  • Various fix ups to the existing CUGDatasource based classes for Unicode and VS2005 support

Ultimate Grid 7.0/7.1

  • Full support for VC++ 2005 compilation (with 0 warnings)
  • Support for XP themes
  • Drop Down Grid Cell Type
  • A powerful new Grid cell type allowing you to add Master Detail functionality to the grid
  • XML Import/Export Functionality - Define the Grid layout, defaults and data using XML
  • Autofit Column Cell Type - Automatically increase the row height to show the entire text string
  • Improved ADO Datasource - Sorting and additional improvements have been made
  • Excel XP look and feel - Configure Ultimate Grid 2005 to have an Office XP-like look and feel
  • Backwards compatible with Ultimate Grid 97 and Ultimate Grid 6.1. So you don't have to worry about any upgrading issues.
  • Common MFC customer suggestions added - We've listened to the developers using the old version and done what you wanted
  • Enhanced Numeric Support

Ultimate Grid 6.0

Cell-types:

  • New drop-down grid celltype, providing functionality to display another Ultimate Grid within a popup window
  • New auto-fit celltype, providing ability for cells to adjust its column and row size in order for the text to be fully displayed.
  • All celltypes were improved to respect the ReadOnly flag
  • All celltypes were improved to function properly with BestFit function
  • The droplist celltype will now properly display when opened with keyboard
  • The multi-font celltype will now properly draw when center or right alignments are selected.
  • A CUGCellType::DrawBackground virtual function was added. This function takes care of drawing the background area of the cells. All standard celltypes were modified to use this function whenever required.
    • By default the DrawBackground function uses the FillRect (with a brush) function to fill-in specified rect. This change provides the grid with a better support for 256 color environments.
  • The CUGCellType::GetBestSize virtual function will now be called with a size parameter initialized to current cells height and width.
    • This information is used by cells with a bitmap to properly calculate width of the bitmap image.
  • The CUGCellType::DrawText will now unselect the font object selected.

Data-sources:

  • New XML parser class was added to provide functionality to load and save XML documents. The XML format supported is compatible with XML files used by the MS Excel XP.
  • An IsOpen virtual function was added to the CUGDataSource
  • Improved on the ADO datasource
    • Implemented sorting functionality
    • Implemented IsOpen function to check if a connection is currently open

CUGCell:

  • Numbers are stored as numbers now
    • For display purposes the numbers are formatted using clients local settings
    • During edit the numeric value is shown without formatting
    • The formatting of numbers can be disabled using UGCELL_DONOT_LOCALIZE cells property flag. Set through CUGCell::SetPropertyFlags.

CUGCtrl:

  • The BestFit function will now send CUGCellType::OnChangedCellWidth and CUGCtrl::OnColSized notifications
  • The OnSheetSetup will now allow users to setup all of the sheets properly, including side heading width.
  • The CUGCtrl::AdjustComponentSizes and CUGCtrl::Moved will not redraw the grid when paint mode is disabled. The AdjustComponentSizes will perform all sizing calculations, but will not redraw any of the grids components.
  • The CUGCtrl::OnPaint and SetPaintMode (TRUE) will call AdjustComponentSizes instead of RedrawAll
  • The CUGCtrl::OnPaint will not pre-paint the entire grid view area with a button face-color, now this function will only draw the bottom right area that is not covered by the scrollbars or any other grids component
  • Added new notification CUGCtrl::OnSelectionChanged, which is called by the multiselect class to inform the user that selection has changed.
  • Added a CUGCtrl::EnableScrollOnParialCells function which control how grid behaves when user drags mouse over partially visible cells (bottom or right side of the grid area), by default we will treat this area as outside of the grid and we will scroll using current ballistics settings. The benefit of this flag is that it is now possible to prevent the grid from taking any action when the mouse is over this (gray) area.
  • The CUGCtrl::BestFit and CUGCtrl::FitToWindow functions are now virtual
  • Added CUGCtrl::AddFontIndirect function that allows users to add CFont objects to the grids font list by passing a LOGFONT object
  • The CUGCtrl::OnKillFocus will now provide pointer to the new window along with the section that lost focus.

CUGGrid:

  • Added TempDisableFocusRect and PaintDrawHintsNow functions to allow for even quicker redraw
  • The CUGGrid::OnPaint determines what are the cells that should be updated (if a rect is invalidated), and redraws only the required cells plus the current cell.

CUGTab:

  • Added a CUGTab::GetTabLabel function to allow retrieval of a tab label string

Miscellaneous:

  • Tooltips will now work on heading cells
  • The m_paintMode flag is now set to FALSE when the grid is created, this will prevent repainting until the grid creation/setup is completed.
  • The multiselect class will now report number of groups properly.
  • The multiselection will now clear when user selects a block of cells (dragging, or SHIFT-click) and clicks on the last selected cell.
  • The Ultimate Grid will properly compile now when UG_ENABLE_PRINTING is not defined

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here