• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 879
  • Last Modified:

How to create grid control in Visual C++?


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!
  • 2
1 Solution
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:

If you want something a bit more feature rich, then you could do worse than look here for a start:


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.
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)


...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

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now