Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error - Record Source of a Browse Object in Grid Builder
Message
From
03/03/2003 08:05:38
 
 
To
28/02/2003 19:24:23
Leo Kool
Agis Automatisering BV
Harmelen, Netherlands
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00759323
Message ID:
00760306
Views:
19
This does not seem to do it. After looping thru and doing the .DeleteColumns the .ColumnCount is left at 0. Setting it to -1 does not seem to help

Thanks

>Hi Don,
>
>I think the columns ar not deleted properly, you can do this the easiest way by issue-ing the following command:
>
>*!* Set to default = -1, which specifies that the Grid control should contain
>*!* enough columns to accommodate all the fields in the grid's record source.
>oGrid.ColumnCount = -1
>*!* Set correct recordsourcetype
>if oGrid.RecordSourceType # 1
>	oGrid.RecordSourceType = 1 && alias
>endif
>*!* get the DE
>= aselobj(aAns,2)
>oDE = aAns[1]
>oGrid.RecordSource = oDE.Cursor1.Alias
>*!* change columns to cusColumn
>for nCol = 1 to oGrid.ColumnCount
>	with oGrid
>		cColumn = "Column" + alltrim(str(nCol))
>		.RemoveObject(cColumn)
>		.AddObject(cColumn, "cusColumn")
>	endwith
>endfor
>
>
>
>HTH,
>
>Leo
Best Regards
Don Simpson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform