[DUG] Grids for data entry
David Brennan
dugdavid at dbsolutions.co.nz
Wed Nov 29 13:22:17 NZDT 2006
For someone starting a new business/project I would recommend the DevExpress
Grid/TreeView/Controls as a must have. Not so sold on their menu/toolbar
controls as they have archictural issues IMO.
Sounds like your project may be a work in progress so getting the full
benefit of the DevExpress suite would require some work (ie if you wanted to
use their editor controls). However you can use their grid or treeview
without using their editor controls and they truly are amazing grids which
look great and have a huge number of features which are relatively easy to
control through options etc.
I have a personal aversion to Woll2Woll components - in my experience the
code behind the control is a nightmare if you ever want to add functionality
or find/fix a bug. However I haven't used VirtualTreeView so I shouldn't
prejudge.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Stacey Verner
Sent: Wednesday, 29 November 2006 8:03 a.m.
To: johnkbird at paradise.net.nz; NZ Borland Developers Group - Delphi List
Subject: RE: [DUG] Grids for data entry
VirtualTreeView is not commercial, and is very good. It's a little hard
to get started with, as you have to build your own associated data
structure, but once you get used to it, its easy and works very well.
I use the Developer Express Grid and TreeView at work and they are
great. So simple to use, with heaps of features.
Stacey
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of John Bird
Sent: Tuesday, 28 November 2006 17:57
To: 'NZ Borland Developers Group - Delphi List'
Subject: [DUG] Grids for data entry
Question in brief:
For a standard StringGrid or DBGrid (ClientDataSet) Is there an easy way
to
get events for:
(1) detecting when I have moved from one cell to another ie an
onCellExit
event
(2) detecting when the contents of a cell have been altered while in
there
ie an onCellChange event or a property CellChanged which could be set if
the
cell is edited since arriving in it (checked at the onCellExit event).
Or is it better to go to a commercial grid. Which grids out there would
you
recommend?
Have looked a but at many such as Woll2Woll VirtualTreeView and others
but
without actually buying them and buckling down and learning them it is
hard
to know how easy/flexible/robust they really are.
More detailed explanation:
Up to now I have done a lot with the standard VCL StringGrid.
The advantages are that I get it to behave pretty much as I want:
-Mainly I pop-up a second grid when a cell changes with matching options
to
choose from - and I coded it myself as I am not making a combo list, I
have
at least 2 columns with either a numerical code and a description either
of
which can be used for looking up valid values. That part I have working
well - involves a few subtle issues about placing the second grid as a
new
modal window at the location of the current cell.
- No upgrade issues going to a later version of delphi.
but the main limitations is that it lacks events for
(1) detecting when I have moved from one cell to another ie an
onCellExit
event
(2) detecting when the contents of a cell have been altered while in
there
ie an onCellChange event or a property CellChanged which could be set if
the
cell is edited since arriving in it.
If I have these extra events, I could do an awful lot more for smart
editing
of data. At present I do an lot of fiddly code in various events to
detect
the moving from one cell to another.
This involves quite a bit of extra code to be used, for example:
Set of routines to give behind scenes setup of std Stringgrid for input
with
lookup
call xcSGridInit once (sets a number of dynamic arrays to track cell
contents and types)
call xcSGridColDef once for each row to set field types
call xcSGridCellStart in GetEditMask event to set which is current cell
call xcSGridCellCheck in grid exit event and SelectCell event (start of
selecting new cell)
call xcSGridFinish in formclose or similar to free arrays
Note defaultdrawing for cells can be set to off (can use to highlight
errors
in a cell)
also has routines to add/delete rows and print grid contents using Rave
John
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list