Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating an event on the fly
Message
From
20/06/2001 07:57:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00515711
Message ID:
00521349
Views:
22
>OK here is my problem:
>My grid has "MyTable" as RecordSource and "1-Alias" as RecordSourceType
>When i click on a record in the grid the information in that record is posted in some textboxes on the form. To do this i have "thisform.refresh" in the click event of Grid1.Column1.text1
>
>So far i have only used the form designer to make the form with the grid and everything works great.
>
>Then I added a Delete-button that deletes the current selected record in MyTable and to do this I use:
>"delete" and then "pack"
>
>After the record has been deleted and the table packed the grid is blank ie. all its properties are set to default.
>
>So my solution to this was to just set all the properties and methods on the fly, but I ran into problems when I got to the click event.
>
>Has anyone ever encountered a problem like this?
>How would you go abouts solving this?
>
>Thanks
>Einar

Einar,
Hit this thread from another link.
Never pack the table in cases like this.
Second if for any reason you would change underlying cursor for a grid first set grid.recordsource to '', do whatever you'd and reassign recordsource. This provides grid to keep its format and controls.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform