Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2003 Server
>>I have very similar grids on two pages of my form.
>>
>>The classes for each of the two grids are defined in a VCX library. The classes for the columns, headers, textboxes, and editboxes used by the grids are defined in a PRG file. Each grid uses its own column, header, textbox, and editbox classes.
>>
>>I set up the grids and their columns using the form designer.
>>
>>I run into very strange behavior when I run the form and go from the page containing one grid to the page containing the other grid, and then back to the first page. When I initially go to the first page, the grid on that page works just fine. I then go to the 2nd page, and the grid there works fine too. However, when i go back to the first page, the grid doesn't work properly. For example, I get error messages from my refresh code that is assigning the controlsource properties of the columns. The messages say that colFilename is undefined. If I run this under the debugger and put a breakpoint in the Refresh method of the page I can see that the Columns collection is empty.
>>
>>The mirron thing happens if I go to the 2nd page first, then to the 1st page, and back to the 2nd page. In this case, the columns in the grid of the 2nd page are missing.
>>
>>Any thoughts?
>>
>>Thanks,
>>Jim
>
>Does the same problem happen if you set up your grids in run-time?
Hi Naomi,
Thanks for your very fast response to my question. The answer to your question is that I haven't tried that.
However, immediately after posting my question I figured out what was causing the problem: I was unintentionally using the same cursor name for the cursors that were populating the two grids. So, when I calculated the cursor for the 2nd grid, it bombed the first grid, and vice versa. I just went in and used separate cursor names for the two grids, and everything works just fine.
It is amazing! I spent a long time trying to figure out what was wrong, and it came to me only after posting my message to UT. UT helps in so many unexpected ways!
Jim
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement