Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Entry using a grid
Message
From
12/08/2005 07:12:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/08/2005 01:14:11
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01040083
Message ID:
01040509
Views:
15
>Hello,
>
>I am trying to setup a grid for entering data that is not tied to a table. The grid has a fixed number of columns (8 - columncount property) and rows (10 - by size of grid). It seems that I need to give it a recordsource, but I don't have one. I tried setting up a cursor with 8 columns of data and inserting 10 records into that cursor, but I get wierd results. Any ideas?
>
>Also is there any way to put a combohox in the header of a grid column?
>
>Thanks in advance for the help!
>
>Randy
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  DataSession = 2
  Height = 400
  Width = 600
  Add Object myGrid As Grid with Height=400, Width=600

  Procedure Load
    Local Array aStruc[8,4],aRecs[10,1]
    Local ix
    store 0 to aStruc,aRecs
    For m.ix=1 To 8
      aStruc[m.ix,1] = "Col"+Padl(m.ix,3,'0')
      aStruc[m.ix,2] = "I"
      aStruc[m.ix,3] = 4
    Endfor
    Create Cursor myCursor From Array aStruc
    Insert Into myCursor From Array aRecs
    locate
  EndProc
Enddefine
Header is not a container type, you can't put combo in it.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform