Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids / recordsource and methods on the text boxes withi
Message
From
26/07/1999 14:20:35
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00246174
Message ID:
00246212
Views:
16
>Hehehe, I should have known I would get that answer... We do that, all of the data comes up fine, but the CONTROL TYPES for the fields etc, is reset to the basic type for text, which is a textbox, aswell the previous VALID methods on the field are set to "" / BLANK. Herein is where the problem lies... Data looks wonderfull, it is just the validation and entry formats that get erased...
>
>Try it... create a table (free table), create a grid etc.. set some validation rule on the textbox, then do what you suggest, reset the recordsource to "" then back to the table. VOILA your validation rules will disappear...
>
>THANKS
>Keith
>
>>before refreshing the tables, set recordsource to '' and then reset it back after refreshing.
>>
>>>We have grids that are bound to temporary tables, these tables get refreshed with the standard recordsource="PAYTEMP" for example, unfortunately all of the standard base methodology that was associated with the textbox / combobox within the grid is lost when you reset the grids datasource...
>>>
>>>Is there an easy way around this..
>>>
>>>Please note the temp table is NOT within a database as it is created from an ODBC call to an SQL server etc...
>>>
>>>THANKS
>>>
>>>Keith
>>>
>>>PS: another problem is grid scroll bar bleed through when we have another control overtop of the grid, sometimes the darn up down arrows pop through when scrolling another grid overtop... looks like a FOX error, but who knows...


Keith,

As soon as you reset the recordsource property, everything inside the grid comes "unhinged" as it were. There are a couple of ways to handle this. My preferred method would be to drive the grid from a view instead of from a table. That way all you have to do is update the view by requerying when the underlying data gets refreshed. Your grid will neither know, nor care that anything happened. The other way would be to write a method to programatically reset the recordsource and active control properties as needed when you rebind the table to the grid. Personally I prefer to use less code, but go with whatever works for you.

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Previous
Reply
Map
View

Click here to load this message in the networking platform