Hello everyone!

I am building a mfc dialog based application in visual c++ 6 and using mysql c api to connect to a database.

What i need is a simple type of data grid to show mysql query results in a dialog.
I do not need to edit, update, save etc data from the dialog. Just show them on screen.
I've checked libraries such as Ultimate Grid but they seem really complicated for my needs.

I would prefer using built in mfc controls but don't really know if there are any suitable.
Is there anything you could suggest as a simple approach to this problem?

Thanks in advance.

There are lots of free grid controls for MFC, here is just one of them. Here is another list from codeproject.com, largest repository of MFC code on the internet.

If all you want is a read-only control then you could do with the standard List control.

I've been trying Mfc Grid Control from codeproject but i can't find it any more helpful than the standard List Control.

What i really need i suppose, is an easy way to insert sql query results to the grid.
I know how to do it the hard way, but i would rather not!
:)
I think i am missing something really essential. It can't be that hard...
:S

You can also use MSFlexGrid. It's fairly easy to use. You can get it when you install VB 6 then just add it to VC++ 6

Thanks, but it is not any different.

I would like to avoid this kind of coding for example :
http://www.softwareandfinance.com/Visual_CPP/MFC_CListCtrl_InsertColumnItem.html

Having to create loops to identify and insert each row and column of the data set.

I am looking for something like this from .net
http://csharp.net-informations.com/datagridview/csharp-datagridview-sql-server.htm

a DataSet-like object.

I know it's probably too much for an outdated tool like that...
:)

Thanks.

You are using the wrong compiler then because VC++ 6.0 knows nothing about .net. When you use ancient compilers you have to expect you will do some things the hard way. Upgrade to VC++ 2012, the Pro version will cost you about $500USD if you live in the USA. BTW I hope you also installed servoce pack #6 for that compiler because it was originally very buggy.

I am updating a legacy application. It's really difficult to transfer the project to VS 2012.
I just wanted something similar to .net's data binding technique to help me going.

If noone else has any suggestions then case closed.

Thanks a lot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.