?
Solved

How to create grid control in Visual C++?

Posted on 2002-05-20
3
Medium Priority
?
860 Views
Last Modified: 2011-10-03
Greetings!

I want create a "Grid control" where I can edit every fiald but without any Database features. I saw it in Delphi and VB but cannot find in VC++.


I found that I can create something like this by using a CListCtrl but there I can edit items only from the first column. I want to be able to edit them all.

How can I do it?

Thank you in advance!
0
Comment
Question by:Masonok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:IainHere
ID: 7021205
Well, if the control is an activeX control, you can use it in VC++ if you want.

If you have a listcontrol, you can enable full row select like this:

SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
0
 
LVL 4

Accepted Solution

by:
IainHere earned 200 total points
ID: 7021221
If you want something a bit more feature rich, then you could do worse than look here for a start:

http://www.codeproject.com/miscctrl/gridctrl.asp

I tested this once (a few versions back) and it worked well.  I stuck with the CListCtrl though, because I trusted it more and I didn't need too much functionality.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7022764
I also recommend looking into that class; Chris Maunder usually writes some good code.

An alternative is to just use the MsFlexGrid ActiveX control (which does not support editing) but then apply the information here:

EditGrid.exe: Edit Cells in MSFlexGrid ActiveX Control (Q196833)

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q196833

...which will let your users edit individual cells in the grid.  It also provides a complete project source code which will show you how to implement the ActiveX.

-- Dan

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question