Click here to Skip to main content
Click here to Skip to main content

The Ultimate Grid Home Page

By , 24 Aug 2007
 

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

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

The Ultimate Toolbox
Web Developer
Canada Canada
Member
Organisation
264 members

In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.
 
Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
SuggestionMerge updates to Ultimate Grid and cut the next version (7.3/8.0)membermetalogicsw.com3 Feb '13 - 13:43 
There are a number of issues fixed in the four updates to Ultimate Grid. I think it would be a good idea to merge them all into the main branch and cut a new version?
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)memberTim Deveaux4 Feb '13 - 7:01 
Yep. Would't be hard to bundle up the code, assuming there's no new quirks to address in VS2012. Problem is the samples, demos, and lib builds - the projects would all need to be reworked to accommodate the VS2010 change re the use of relative paths.
 
Which feels enough like work to make even the most ardent UG supporter want to run down for another cuppa joe and play some pac person instead.
 
Hmmm... maybe could be automated? Any takers?
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)membermetalogicsw.com4 Feb '13 - 20:32 
I'm still on VC2008 so I'm not familiar with the VC2010 changes you mention. Could you elaborate?
 
I volunteer to help.
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)memberTim Deveaux5 Feb '13 - 7:21 
Well, the short of it is that VS 2010 doesn't like relative paths in the project file - things like ..\..\include etc., and seems to want everything to conform to the use of such macros as $(IntDir) etc.
 
A few 2010 users have commented on this. It's not rocket science to fix manually for a sample or two that you're interested in, just a bit tedious to get everything right in all the projects.
 
That said, it's been a while since I looked at this (I'm still on 2008 myself). Not sure if 2012 is the same.
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)membermetalogicsw.com9 Feb '13 - 13:02 
Alright, so I installed VC2010 to see what the issue was. But everything built. While there were warnings, I was able to build all the following solutions (which should include all project I think):
BuildDLL\Build DLL VC2005.sln
BuildLib\ugmfclib.sln
Demos\AllDemos\AllDemos.sln
Examples\AllExamples\AllExamples.sln
 
All I needed to do was let the conversion wizard convert the project file form VC2005 to VC2010. All builds were done in Debug configuration only.
 
So I'm not sure what the issue other people are reporting is.
 
But in any case, why is upgrading the projects to VC2010 a prerequisite to merging the 4 updates to UG anyway?
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)memberTim Deveaux9 Feb '13 - 13:34 
metalogicsw.com wrote:
But in any case, why is upgrading the projects to VC2010 a prerequisite to merging the 4 updates to UG anyway?

It isn't, of course. I had thought that it might be nice to 'take it to the next level' and straighten things out re 2010 issues.
 
Which seem to not exist.
 
Right. Nothing to see here... move along, move along...
 
If you'd like to be a Toolbox Member I can approve your application and make you an Author, which should allow you to upload a beta to the Updates page.
 
I'm easy on versioning, but might reserve 8.0 till this has been tested on 2012 - anyone?
 
Cheers
 
Tim
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)membermetalogicsw.com9 Feb '13 - 19:46 
Hi Tim,
Thank you for the offer. I would be delighted to become a Toolbox Member.
 
I already have a merged package (base + 4 updates) ready to go. I'll spend some time on creating both VC2010 and VC2012 projects to get get us to that "next level".
 
As for versioning, I agree, 7.3 is appropriate. After all, this is not a major feature release but rather and official packaging of improvements we've had for some time now.
 
P.S.: For some reason, I don't receive and email when someone replies even though I've left the message with the default "E-mail me if someone replies to this message" checked Confused | :confused:
 
Thanks!
- Santiago
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)memberTim Deveaux10 Feb '13 - 6:39 
metalogicsw.com wrote:
Thank you for the offer. I would be delighted to become a Toolbox Member.

Great - you'll need to apply though, I don't think I can just add you - there's a link, I think, on the Ultimate Toolbox member page.
 

metalogicsw.com wrote:
P.S.: For some reason, I don't receive and email when someone replies even though I've left the message with the default "E-mail me if someone replies to this message" checked

Hmmm... maybe they are being eaten by a spam filter?
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)membermetalogicsw.com10 Feb '13 - 22:06 
Tim Deveaux wrote:
Great - you'll need to apply though, I don't think I can just add you - there's a link, I think, on the Ultimate Toolbox member page.
Done.
 
I've made some progress. I did some more research about the relative path issue that you had mentioned earlier. The reason why I couldn't duplicate it is because it was fixed by the time VS2010 shipped. So this was only a concern with the betas. Here is the link to the bug:
http://connect.microsoft.com/VisualStudio/feedback/details/499471/outdir-is-not-properly-rooted-when-it-is-relative[^]
We don't need to worry about that issue.
 
That said, there were a bunch of path related warnings when building the different configurations under VS2010. I've made new projects and tweaked the settings to fix the warnings. The following files were added to the source zip:
BuildDLL\Build DLL VC2010.sln
BuildDLL\Build DLL VC2010.vcxproj
BuildLib\ugmfclib VC2010.sln
BuildLib\ugmfclib VC2010.vcxproj
There are still some warnings left but none are serious.
 
I've also merged the 4 updates into that zip.
 
Until I get the membership application approved and can upload the zip myself, you can find it here:
http://metalogicsw.com/temp/UltimateGrid73_src.zip[^]
GeneralRe: Merge updates to Ultimate Grid and cut the next version (7.3/8.0)memberTim Deveaux11 Feb '13 - 5:58 
Thanks - sounds good.
 
I've approved your application and upgraded you're status to Author, which should at least allow you to modify the contributions page. (There's also an email to that effect on it's way but you reported having trouble getting responses to these posts so...)
 
Cheers and thanks again -
 
Tim

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 25 Aug 2007
Article Copyright 2007 by The Ultimate Toolbox
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid