Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Question
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00722833
Message ID:
00723365
Views:
8
Vlad:
Thanks for the follow-up!

>Hi!
>
>Nulling RecordSource is correct here (this was usual workaround to avoid reconstruction for years), but it should be BEFORE original record source alias is closed or went away from Grid's scope.
>
>Sometimes static record source is nto acceptable...
>
>>It seems that nulling the recordsource would set grid's columns back to their default state. Instead of modifying your recordsource, you might try assigning a static recordsource (like a cursor that is defined in your form's load event [make sure to have it created when you build your grid and assign it as a record source]). Instead of nulling the source when you change data, simply zap and append to your static record source from a file or cursor with a matching file structure.
>>
>>>Hello
>>>
>>>I have some code in the keypress event of a textbox in a grid (based on a table) and i have a command button to delete the contents of the table.
>>>
>>>what's happening is first time when form is run keypress event works fine,but when command button is clicked and grid gets refreshed by setting recordsource="" and again resetting the keypress doesn't fire.
>>>
>>>how to make the keypress to fire after the delete.
>>>
>>>
>>>txs
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform