Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wierd grid problem
Message
 
 
À
01/02/1999 12:30:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00182521
Message ID:
00182568
Vues:
8
>>>>>>>>>>This is a strange one, folks...
>>>>>>>>>>
>>>>>>>>>>I have a form that is a gateway to another form. The form has a grid of repairs and when I choose a repair, I can click a button to get the other form with the details. It's this repair form I was working on. I have done _nothing_ to the base form except run it. Absolutely no changes have been made to this form. It was running fine, showing the repairs and I used it to get to the repairs form several times.
>>>>>>>>>>
>>>>>>>>>>Then, out of the blue, the base form stopped working! The grid is visibly empty. The view it is based on has plenty of records. I can see them if I browse. If I click around on the grid, the status bar tells me I'm changing records in the correct view. But the data isn't showing up in the grid!
>>>>>>>>>>
>>>>>>>>>>I'm at a complete loss. I've never seen this before. I exited VFP and came back in hoping it was a glitch, but that didn't fix it.
>>>>>>>>>>
>>>>>>>>>>Anyone have any ideas?
>>>>>>>>>>
>>>>>>>>>>Thanks,
>>>>>>>>>
>>>>>>>>>Michelle,
>>>>>>>>>Have you never seen empty grid? It's probably the first thing any person working with grid will see applying Manuals and other Docs :).
>>>>>>>>>How do you refresh the grid contents?
>>>>>>>>
>>>>>>>>Sure, I've seen an empty grid before. But not one that was filled with stuff and had no changes made to it.
>>>>>>>>
>>>>>>>>I requery the view and refresh the grid.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>
>>>>>>>So, it's just Grid.Refresh after Requery("View")? I know that some guys will not be happy with my reply, but you could try to restore Grid.RecordSource and other settings.
>>>>>>
>>>>>>The problem with that is that I know it has the right recorcsource. I don't see how it can be a coding problem. It's been working for months, and I didn't change _anything_.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>-Michelle
>>>>>
>>>>>I did not say that this is coding problem. This is philosophical problem. So try to do this or rebuild your grid from scratch, either one will work.
>>>>
>>>>Are you telling me my computer is getting philosophical? :)
>>>
>>>Yep :)
>>>The way you use grid is normal for view, but as you know will not work for cursor. Why? Probably, because there is some code behind which do some job for you, and it used to work, unless you computer will decide that you have to do this yourself :).
>>
>>I'm not following you... What does a cursor have to do with it? I'm not using a cursor...
>
>If you would use cursor the same straightforward way as you use view, then you would get empty grid immediately, because cursor would require to restore grid setting or use another GUI solution. Both of them, view and cursor force VFP to rebuild its grid from scratch on every 'requerying'. So the difference is that view has something inside to avoid manual coding often mandatory for cursors, i.e. there is some code inside to do this job, and it works OK usually, but as you know VFP is intricated environment and relying on some hidden code (even with utmost respect to MS team) you still take chances. That's it, nothing else, and morever it's partially just a speculation on my part about possible hidden behaviour.

Ok, I see what you're saying. I'll try it, but I don't hold much hope. When you kill a grid by losing the recordsource, it goes completely empty. This grid isn't empty. It's just like there's a bunch of blank records, but the records aren't blank.

Thanks,

-Michelle
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform