Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo in grid
Message
 
 
To
08/06/1999 15:00:33
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00227594
Message ID:
00227610
Views:
25
Hi Todd,

>Sure! Just make sure that the control type is editbox, not textbox
>

I put this code in grid Init method:
FOR i=1 TO ALEN(lafieldlist,1)
	This.addcolumn(This.columncount+1)				&& Add column to the end
	lcCaption=Proper(SUBSTR(lafieldlist[i],AT(".",lafieldlist[i])+1))
	if TYPE(lcCaption)="M" && Memo
	       This.columns(i).AddObject('edtMemo','editbox')  && Add editbox
*!*		   This.columns(i).chkADC.Caption=""
		   This.columns(i).edtMemo.Visible=.T.	   
		   This.columns(i).CurrentControl="edtMemo"
	endif   

	
	if left(lcCaption,3)="Adc"
	   lcCaption="ADC"+Proper(substr(lcCaption,4))
*!*		   This.columns(i).AddObject('chkADC','checkbox')  && Add checkbox
*!*		   This.columns(i).chkADC.Caption=""
*!*		   This.columns(i).chkADC.Visible=.T.	   
*!*		   This.columns(i).CurrentControl="chkADC"
	endif   

	
	This.columns(i).header1.caption = lcCaption		&& Add header
    lnWidth=fsize(lcCaption)
    lnWidth=iif(lnWidth>30,lnWidth-20,lnWidth)
    This.columns(i).width= MAX(lnWidth,len(lcCaption) ) * THIS.FONTSIZE
	This.columns(i).controlsource = lafieldlist[i]	&& Assign controlsource
ENDFOR
Now I can change the content of Memo field, but I still can not read it. What did I do wrong?


>>
>> Is it possible to read content of Memo field in Grid if grid columns are populated in run-time?
>>
>> Thanks in advance
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform