-
May 27th, 2008, 06:52 PM
#1
populate a datagrid from a text box search.
I have no prior c++ programming experience only vbscript in asp pages, sorry to say.
Here is what I am trying to accomplish:
A user types in a text box (txtSearch) and then clicks a button (cmdSearch).
From there I would like the results returned to a datagrid (DataGrid1).
I'm using Visual C++ 6 and an access database.
I can make the skeleton of the program in Visual C++ rather easily, though I can't seem to find a datagrid control.
Could someone assist me in this?
I really want to learn how to do this.
-
May 28th, 2008, 03:21 AM
#2
Re: populate a datagrid from a text box search.
Originally Posted by XandarX
... I would like the results returned to a datagrid (DataGrid1).
I'm using Visual C++ 6 and an access database.
...
I can't seem to find a datagrid control.
So where and how did you try to look for "datagrid control"?
And what in this case does the DataGrid1 mean?
Have you tried to find something useful going into Menu Project -> Add to Project -> Components and Controls -> Registered ActiveX Controls -> choose something like "DBGrid Control" or "Microsoft DataGrid Control 6.0 (SP6) (OLEDB)" or something else... (I don't know what you need and never used any grid control at all - for my purposes using the "common" ListView control was pretty good and enough)
Victor Nijegorodov
-
May 28th, 2008, 06:52 AM
#3
Re: populate a datagrid from a text box search.
Originally Posted by VictorN
(I don't know what you need and never used any grid control at all - for my purposes using the "common" ListView control was pretty good and enough)
most likely because the OP has previous VB experience and grids are really common in VB.
-
May 28th, 2008, 10:13 AM
#4
Re: populate a datagrid from a text box search.
got that part worked out. the control wasn't registered. found it and now it's on my form.
DataGrid1 is the name of the datagrid control on my form.
I need to populate it with information from an access database based on a sql query performed when the button is pressed.
-
May 28th, 2008, 10:18 AM
#5
Re: populate a datagrid from a text box search.
-
May 28th, 2008, 10:37 AM
#6
Re: populate a datagrid from a text box search.
Originally Posted by XandarX
what is an "OP"?
Original Poster - the person who started the thread.
-
June 3rd, 2008, 06:23 PM
#7
Re: populate a datagrid from a text box search.
the msflexgird is also a fairly nice choice available in vc++6.0. just for s&g does anybody know what they did with msflexgrid in vc++7.0(?) that comes in vs2005? this has been driving me nuts.
-
June 3rd, 2008, 06:40 PM
#8
Re: populate a datagrid from a text box search.
Try adding it to your toolbox. It should be listed under Com Components. Assuming you have upgraded your vc++? If you never had it on that machine I do not know that it is available with the installation. I think it's an ocx file, may be able to load it. msflxgrd.ocx
-
June 3rd, 2008, 06:42 PM
#9
Re: populate a datagrid from a text box search.
I just realized that I switched from vc++ to vb. I'm in the wrong forum.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|