Click here to Skip to main content
15,885,144 members
Articles / Desktop Programming / MFC
Article

The ALXGrid Control Library.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (29 votes)
10 Nov 20021 min read 199.5K   5.5K   85   49
The ALXGrid Control Library is a set of classes for management of data as a table.

Sample Image - hchart.gif

Introduction

The ALXGrid Control Library is a set of classes for management of data as a table. It is realized as static library on the basis of library MFC. The library includes classes: CALXGridView, CXGridView - for support of technology document - performance, and CALXGridCtrl, CXGridCtrl - for use in dialog boxes. And also classes - controls of cells.

In this version built-in sources of data are not supported, you should take care of filling the table with contents.

Samples

Image 2

The complete set of delivery also includes samples showing applications of ALXGrid library:

  • GridRange- the most simple example, showing how to connect library to your application, and also displays plenty of rows and columns;
  • GridControls - sample of job with control of cells;
  • GridImage - demonstrates how to display images in cells;
  • PrintGrid - sample of a conclusion to a seal of contents of grid;
  • GridDlg, GridDlgApp - shows how to use a grid in dialog boxes and in applications on the basis of dialog boxes;
  • GridApp - the basic opportunities of a grid are shown: styles, addition, removal and insertion of rows;
  • SplitGrid - support of dynamic splitters is demonstrated;
  • Grid&Sort - sorting of rows and columns;
  • Grid&Select - selection of cells;
  • GridValidate - validation of entered values;
  • GridMultiLine - multiline cells.

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


Written By
Web Developer
Russian Federation Russian Federation
Year of birth - 1974.
Eeducation - was ended by Kaliningrad State University in 1997.
Now I work as the engineer-programmer in Kaliningrad (RUSSIA).

Comments and Discussions

 
Questionabout the function of CALXGridView Pin
jerry8352982-May-12 23:24
jerry8352982-May-12 23:24 
GeneralMy vote of 5 Pin
Manoj Kumar Choubey12-Feb-12 20:31
professionalManoj Kumar Choubey12-Feb-12 20:31 
GeneralCombolist control Pin
ptrimbakkar@tpcsed.com9-Feb-11 20:16
ptrimbakkar@tpcsed.com9-Feb-11 20:16 
GeneralRe: Combolist control Pin
ptrimbakkar@tpcsed.com13-Feb-11 21:29
ptrimbakkar@tpcsed.com13-Feb-11 21:29 
Generalthanks VERY VERY VERY much, you are my super star. Pin
whiteideal8-Apr-10 1:42
whiteideal8-Apr-10 1:42 
GeneralError to insert Combo Box column after Edit box column Pin
Jaswinder Singh1-Nov-06 0:57
Jaswinder Singh1-Nov-06 0:57 
QuestionAdding/removing columns dynamically Pin
SADVMS22-Jun-06 17:37
SADVMS22-Jun-06 17:37 
Generalsome proposals Pin
EndlessWinter11-Jan-05 14:06
EndlessWinter11-Jan-05 14:06 
GeneralSelected cell color in full row select Pin
EndlessWinter22-Dec-04 15:09
EndlessWinter22-Dec-04 15:09 
GeneralRow select Pin
EndlessWinter22-Dec-04 13:27
EndlessWinter22-Dec-04 13:27 
GeneralDouble & Right mouse click in cells\rows Pin
Nert DinAlt23-Jan-04 8:49
Nert DinAlt23-Jan-04 8:49 
GeneralFormatted cells Pin
Atlence2-Jan-04 5:37
Atlence2-Jan-04 5:37 
GeneralRe: Formatted cells Pin
Alexey4-Jan-04 19:55
Alexey4-Jan-04 19:55 
Generala bug with CALXGrid::GetActiveRow() Pin
Ken Keray10-Dec-03 6:03
Ken Keray10-Dec-03 6:03 
GeneralI have an idea Pin
Ken Keray12-Nov-03 22:53
Ken Keray12-Nov-03 22:53 
Hello!
I have an idea to make ALXGrid more developed.

IMHO the library has one big defect with cell controls.
I mean, that there is no easy way to make your own cell control.
For sample, to insert own CEdit-derived control you must override
CALXGrid::CreateCellCtrl() and copy a part of the method from base class source code.

I found the way to use the CRuntimeClass class for CALXCellCtrl kinded classes.
In the first I add next virtual method
virtual CALXCellCtrl *CALXGrid::GetColCtrlRC(BYTE CtrlType, CRuntimeClass &rc) const;
This method returns CRuntimeClass data for cell control creation. I use it in CALXGrid::CreateCellCtrl(...) method. By default this returns RUNTIME_CLASS() for basic
cell controls.

But there is a problem with cell control deriving.
For sample, CALXEditCtrl is derived as public from CEdit and CALXCellCtrl.
In such case you cannot write something like next
...<br />
   // CRuntimeClass rcCell<br />
   CALXCellCtrl *pCellCtrl = (CALXCellCtrl*)rcCell.CreateObject();<br />
   if(pCellCtrl != NULL)<br />
   {<br />
	pCellCtrl->CreateCtrl(dwStyle,m_pGridWnd,nID);<br />
        ...<br />
   }


But you can write the same so
CObject *pCellOb = rcCell.CreateObject();<br />
   CRuntimeClass *prcPrev = rcCell.m_pfnGetBaseClass();<br />
   int size = prcPrev ? prcPrev->m_nObjectSize : rcCell.m_nObjectSize;<br />
   CALXCellCtrl *pCellCtrl = (CALXCellCtrl*)((BYTE*)pCellOb+size);


Of course, you must insert DECLARE_DYNCREATE() and IMPLEMENT_DYNCREATE() declarations
in code of basic cell controls and also modify their constructors as methods without parameters.
I know, that in this version CALXCellCtrl needs a reference to grid contol, but you can
get it in CALXCellCtrl::CreateCtrl() methods (from parent). To convert CWnd* ptr to CALXGrid* ptr
use the way, described above.

Ken Keray
GeneralCAN'T BUILD GRIDAPP Pin
drpc12-Jul-03 2:14
drpc12-Jul-03 2:14 
GeneralRe: CAN'T BUILD GRIDAPP Pin
Alexey14-Jul-03 1:56
Alexey14-Jul-03 1:56 
Questionhow to change the height of the row Pin
huo xiaoqing2-Apr-03 11:16
huo xiaoqing2-Apr-03 11:16 
AnswerRe: how to change the height of the row Pin
Alexey2-Apr-03 20:57
Alexey2-Apr-03 20:57 
QuestionI Need Help? Pin
zhbjhwli27-Feb-03 15:21
zhbjhwli27-Feb-03 15:21 
AnswerRe: I Need Help? Pin
Alexey27-Feb-03 19:32
Alexey27-Feb-03 19:32 
GeneralRe: how do dyncmic change the heigth of the row? Pin
Alexey26-Feb-03 3:28
Alexey26-Feb-03 3:28 
QuestionHow to Get rect Info of Cell in GridCtrl Pin
zhbjhwli18-Feb-03 16:08
zhbjhwli18-Feb-03 16:08 
AnswerRe: How to Get rect Info of Cell in GridCtrl Pin
Alexey19-Feb-03 19:21
Alexey19-Feb-03 19:21 
GeneralDoes it surpport ADO Recordset Pin
brick19-Dec-02 22:14
brick19-Dec-02 22:14 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.