Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to disable a row in a grid?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00310316
Message ID:
00310409
Vues:
17
>Nick,
>
>>>
>>>Is there some method to impede the edition of a specific row in a grid according to a condition?
>>>
>>>I have attempted with this instruction in the init event of the grid
>>>
>>>This.SetAll("Enabled", lCondition, "Column")
>>>
>>>but this disables all the columns when a record completes th
>>>e condition.
>>>
>>>I thank any help a lot!
>>>
>>>JL
>>
>>Jose, you may try to put the code into all column's textboxes When() events, so each time you are trying to edit the value in that record the textbox will disable itself.
>>
>
> If we have situation with dynamic change of standard TextBox to out Text (or whatever) class in grid Init method? How we should resolve this situation? Or, for example, I want to Add records, then user hits Enter, and delete, if whole content of column deleted, how can I do this? My TextBox class should be completely separate and doesn't know about it's Grid parent.

Hi Nadya,

Even if your textbox is completely separate it may check if its parent is a Column and behave differently in this case.

*Some method in textbox
IF this.parent.class = "Column"
* code to change textbox behaviour
ENDIF

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform