Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid columncount goes to zero!
Message
From
07/09/2011 12:37:48
 
 
To
07/09/2011 08:36:43
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01522860
Message ID:
01522909
Views:
111
>>
>>Try to clear grid controlsource first and set it back on the end
>>
>>
>>thisform.Grid1.ControlSource = ""
>>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
>>thisform.Grid1.ControlSource = "curBrowseModalS"
>>thisform.Grid1.Refresh()
>>
>>
>>
>>But I prefer to create and use an index and change the order on the fly
>>
>>
>>Regards,
>>Onytoo
>
>To clear the controlsource is exactly the way NOT to do it!!!!!! Read my code to see how you avoid it.

Yes, I already read your codes, but that is your "safe select" method, not mine.
If you read last line of my reply, then you should see I always use index for this purpose, so I never use "safe select" method
or emptying grid.controlsource on runtime.


Regards,
Onytoo
Regards,
Ony
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform