Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid columncount goes to zero!
Message
From
06/09/2011 22:38:10
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid columncount goes to zero!
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01522860
Message ID:
01522860
Views:
146
Hi All:

I constructed a grid on the fly with a columncount of 6 and set all the properties. Everything works. The recordsource is 'curbrowsemodal' and the recordsourcetype is 1.

Now I want to give the user the ability to decide the sort order.

As soon as I execute the following, the coulumnn =count goes to zero!
IF thisform.opgSortDirection.option1.Value = 1   &&Ascending
	SELECT * ;
	FROM curBrowseModal ;
	ORDER BY cSortSeqASC ASC ;
	INTO CURSOR curBrowseModal
ELSE
	SELECT * ;
	FROM curBrowseModal ;
	ORDER BY cSortSeqDSC DESC ;
	INTO CURSOR curBrowseModal
ENDIF
If I try to solve the problem by setting the recordsource to curBrowseModalS and executing the following, I get an empty grid!
IF thisform.opgSortDirection.option1.Value = 1   &&Ascending
	SELECT * ;
	FROM curBrowseModal ;
	ORDER BY cSortSeqASC ASC ;
	INTO CURSOR curBrowseModalS
ELSE
	SELECT * ;
	FROM curBrowseModal ;
	ORDER BY cSortSeqDSC DESC ;
	INTO CURSOR curBrowseModalS
ENDIF
And if I create the curBrowseModalS ahead of time, I get a zero columncount!




Thanks,

Yossi
Next
Reply
Map
View

Click here to load this message in the networking platform