Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Making grid programmatically
Message
From
04/04/2002 20:56:54
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00640695
Message ID:
00641218
Views:
18
Thanks for the replies and possibility of my solution, but I have already made the code for creating the grid and I can not make an AfterRowColChange property. Here is the code :
Thisform.addobject('grid1','grid')
Thisform.addobject('text1','textbox')

with thisform.grid1
	 .recordsource='temp'
	 .columncount=12+(jum_po*2)
	 .scrollbars=3
	 .left=40
	 .height=253
	 .top=150
	 .width=711
	 .gridlinecolor=rgb(97,105,156)
	 .backcolor=rgb(97,105,156)
	 .visible=.t.
	 .column1.controlsource='nmbrg'
 	 .column1.header1.caption='MATERIAL NAME'
	 .column1.header1.forecolor=rgb(255,255,255)
	 .column1.header1.backcolor=rgb(97,105,156)
	 .column1.header1.fontbold=.t.
	 .column1.header1.alignment=2
	 .column1.forecolor=rgb(0,0,0)
	 .column1.backcolor=rgb(179,210,236)
	 .column1.alignment=0
	 .column1.readonly=.t.
	 .column1.width=360

	 .column2.controlsource='color'
         .column2.header1.caption='COLOR'
	 .column2.header1.forecolor=rgb(255,255,255)
	 .column2.header1.backcolor=rgb(97,105,156)
	 .column2.header1.fontbold=.t.
	 .column2.header1.alignment=2
	 .column2.forecolor=rgb(0,0,0)
	 .column2.backcolor=rgb(179,210,236)
	 .column2.alignment=0
	 .column2.readonly=.t.
	 .column2.width=80
	
	 for n=1 to alen(ar_po)  &&columns determine by users
 	     jcol='column'+alltrim(str(n+c))+'.'
     	     .&jcol.controlsource='org'+alltrim(str(n))
	     .&jcol.header1.caption='ORIGIN '+substr(ar_po[1,n],4,5)
	     .&jcol.header1.forecolor=rgb(255,255,255)
	     .&jcol.header1.backcolor=rgb(97,105,156)
	     .&jcol.header1.fontbold=.t.
	     .&j col.header1.alignment=2
	     .&jcol.forecolor=rgb(0,0,0)
	     .&jcol.backcolor=rgb(179,210,236)
	     .&jcol.alignment=1
	     .&jcol.inputmask='99,999,999.99'
         next n

  	 n=2+(alen(ar_po))
	 jcol='column'+alltrim(str(n+1))+'.'
	 .&jcol.controlsource='stock'
	 .&jcol.header1.caption='STOCK'
	 .&jcol.header1.forecolor=rgb(255,255,255)
	 .&jcol.header1.backcolor=rgb(97,105,156)
	 .&jcol.header1.fontbold=.t.
	 .&jcol.header1.alignment=2
	 .&jcol.forecolor=rgb(0,0,0)
	 .&jcol.backcolor=rgb(179,210,236)
	 .&jcol.alignment=1
         .&jcol.inputmask='99,999,999.99'
	 .&jcol.readonly=.t.
	 .&jcol.width=80

	 .refresh()
	 .column1.setfocus()
endw

and this is what I want to add :

*!*	PROCEDURE AfterRowColChange
*!*	thisform.text1.value=temp->nobrg
*!*	ENDPROC
Is there any code that I miss ?

TIA,

Budianto
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform