Information générale
Catégorie:
Codage, syntaxe et commandes
Hi Lutz,
I will try refreshing the container that the grid is in as that is easy to do. If that does not help, as I replied to Tamar, maybe I will try adding a record to the view before I fire the code that binds the controls to the underlying view (this is delayed as the view name changes each time).
Thanks.
Albert
>I remember that I had problems with grids without any record and disappeared rows and DYNAMIC* stuff. For all I know a combination of grid.refresh and grid.parent.refresh after APPEND (or the like) or SET FILTER TO was the solution for me.
>
>Lutz
>>Hi,
>>
>>I have a grid where the user picks a "type" in the first column and then based on that, certain columns are skipped for the rest of the grid. To make it obvious, I also change the backcolor of those columns to be grey to visually signal they cannot be edited any longer. I use DynamicBackColor for this something like:
>>
>>grid.Column5.DynamicBackColor = "IIF(AnnuityType='Life',RGB(255,255,255),RGB(220,220,220))"
>>
>>- it works great 98% of the time
>>- if I start with a grid populated with data, it works
>>- if the user changes the type from "Life" to something else, it works
>>- if I add a row to the grid (via a button), it works
>>
>>But it does not work if:
>>
>>- I start with a blank grid upon form startup and then add a row
>>- for this instance, if I add a row and save the changes and reload the form, it works
>>
>>I don't have anything in my expression to evaluate the record number or primary key etc. that would be affected by starting the grid with no records.
>>
>>In the help file, it says the dynamic back color is reevaluated every time the grid is refreshed - so I force this at the bottom of my code that fires when the user changes the "type". I did not see any bug listed in the help file (the updated one) or kilo-fox. I also tried refreshing the individual columns instead of the grid as a whole and that did not help.
>>
>>Strange.
>>
>>Albert
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