Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Load Event, Creating Cursor in
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00236691
Message ID:
00236698
Views:
14
Put the grid you your form then set the recordsource to the cursor name.
In the init of the grid you can then go through and format the grid and the columns. Here are some examples:
* disable all columns (prevents user changes)
this.setall('enabled',.F.,'column')

* remove the first column (the unique id that users shouldn't see
this.removeobject(this.columns[1].Name)
You can do other processing like setting columns widths etc..

A question: Why can't you add the table from the accounting system to your form DE? You could then use the grid builder to do all your changes visually.

>A form I am currently building is part of a Change Order system. To begin with, the application needs to access a table from our accounting system (written in FoxPro) to gather all current orders and display them to the user so that the user can select one.
>
>Below is what I have attempted so far. I am attempting to SELECT INTO CURSOR in the Load event of the form. From there, my intentions were to display the data on a Grid in the form. PROBLEM: There is no cursor to put in the Data Environment of the form at design time. I'm not even sure if I'm going about this right. Would appreciate help. TIA, Chuck
>
>
>SELECT * ;
>FROM OrdrHdr ;
>INTO CURSOR curBrowseOrders ;
>WHERE SUBSTR(CstOrd,1,1) <> " " ;
>ORDER BY CstOrd
>
Previous
Reply
Map
View

Click here to load this message in the networking platform