-
Binding a grid control
Hello everyone,
I am old to FoxPro, new to VFP 6.0. I receive an error that my grid control
cannot find the alias to which is bound. My grid works fine when I include
this table in my dataenvironment, however, this table needs to be created
at run time. Can I still include it in my dataenvironment? help!
-
Re: Binding a grid control
In article <38fbc7a1$1@news.devx.com>, mycraig@msn.com says...
> I receive an error that my grid control
> cannot find the alias to which is bound. My grid works fine when I include
> this table in my dataenvironment, however, this table needs to be created
> at run time. Can I still include it in my dataenvironment? help!
No: just bind the grid to the table after you create the table. You'll
lose any custom field settings you do at design time, though... Do you
have to create the table at run-time, or can you use a view for the
RecordSource?
--
#INCLUDE "\Program Files\Microsoft Visual Studio\VFP98\StdDsclm.h"
(Anyone who thinks that I do anything vaguely resembling speaking
for Microsoft is sorely deluded...)
-
Re: Binding a grid control
Hi
Unless you really absolutely need a table, you can create a view of a table
and use it as RecordSource of a grid control. The view cursor can be made
updateable so you can insert and modify records and transfer the changes to
the table behind the view when you like.
-Anders
"Craigw" <mycraig@msn.com> wrote in message news:38fbc7a1$1@news.devx.com...
>
> Hello everyone,
>
> I am old to FoxPro, new to VFP 6.0. I receive an error that my grid
control
> cannot find the alias to which is bound. My grid works fine when I
include
> this table in my dataenvironment, however, this table needs to be created
> at run time. Can I still include it in my dataenvironment? help!
-
Re: Binding a grid control
If you can create the table in the load event of the form, you're good to
go. Otherwise, you'll have to do some programmatic building of the grid
after the recordsource is available.
--
William Fields
MCP - Microsoft Visual FoxPro
US Bankruptcy Court
Phoenix, AZ
"Craigw" <mycraig@msn.com> wrote in message news:38fbc7a1$1@news.devx.com...
>
> Hello everyone,
>
> I am old to FoxPro, new to VFP 6.0. I receive an error that my grid
control
> cannot find the alias to which is bound. My grid works fine when I
include
> this table in my dataenvironment, however, this table needs to be created
> at run time. Can I still include it in my dataenvironment? help!
-
Re: Binding a grid control
Craig,
You can create the table/cursor in the Load() event of the form, that way it
will be available for the Grid to bind to when it instantiates.
--
df - (Microsoft FoxPro MVP) http://www.geocities.com/df_FoxPro/
"Craigw" <mycraig@msn.com> wrote in message news:38fbc7a1$1@news.devx.com...
>
> Hello everyone,
>
> I am old to FoxPro, new to VFP 6.0. I receive an error that my grid
control
> cannot find the alias to which is bound. My grid works fine when I
include
> this table in my dataenvironment, however, this table needs to be created
> at run time. Can I still include it in my dataenvironment? help!
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks