Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid
Message
 
To
06/03/2006 15:27:15
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Re: Grid
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101819
Message ID:
01101843
Views:
10
Mohammed,
This works fine.
Look at my comments.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN
*************
DEFINE CLASS form1 AS form


	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT grid1 AS grid WITH ;
		ColumnCount = 3, ;
		Height = 131, ;
		Left = 48, ;
		Top = 46, ;
		Width = 309, ;
		Name = "Grid1", ;
		Column1.Name = "Column1", ;
		Column2.Name = "Column2", ;
		Column3.Name = "Column3"

	PROCEDURE Init
		CREATE TABLE trans1 (bookno c(10),sticket c(10), eticket c(10),dummi c(30))
		INSERT INTO trans1 VALueS([1],[11111],[1111111],[dummi111])
		INSERT INTO trans1 VALuES([2],[22222],[2222222],[dummi222])

		Select * from trans1 into cursor csrmyCursor readwrite where .F.
		With thisform.Grid1
		  .RecordSource = "csrMyCursor"
		  .Columncount = 3  &&& <---look this line
		  .Column1.ControlSource = "csrMyCursor.bookno"
		  .Column2.ControlSource = "csrMyCursor.sticket"
		  .Column3.ControlSource = "csrMyCursor.eticket"
		ENDWITH
		append blank
	ENDPROC
ENDDEFINE
>hi all,
>
>i try to append new empty record at mygrid as code under..not work,
>
>can i append new record at the last field (condation last filed not empty have (character or numaric type)
>
>
>    Select * from trans1 into cursor csrmyCursor readwrite where .F.
>With thisform.Grid1
>  .RecordSource = "csrMyCursor"
>  .Column1.ControlSource = "csrMyCursor.bookno"
>  .Column2.ControlSource = "csrMyCursor.sticket"
>  .Column3.ControlSource = "csrMyCursor.eticket"
>ENDWITH
>USE cursor csrmyCursor
>append blank
>
>thanks.
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform