Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid
Message
De
06/03/2006 16:32:45
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Grid
Versions des environnements
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Divers
Thread ID:
01101819
Message ID:
01101860
Vues:
10
hi,
yes this is what i need,thanks

i use ALLOWADDNEW PROPERTY to add new record at my grid,

how i can use it at the last field(not empty) at my grid to append new record at mygrid.

thanks.

>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform