Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to disable a row in a grid
Message
 
 
À
03/01/2014 13:50:13
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP3
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01591295
Message ID:
01591298
Vues:
115
This message has been marked as the solution to the initial question of the thread.
>>>Dear all,
>>>I have a grid in my form and i want to disable some rows based on a field content.
>>>I write this:
>>>
>>>thisform.grid1.SetAll('ReadOnly',IIF(CanEdit=1, .F., .T.),'Column')
>>>
>>>But this not work properly.
>>>I do this with :
>>>
>>>thisform.grid1.SetAll('Enabled',IIF(CanEdit=1, .F., .T.),'Column')
>>>
>>>But this destroyed my grid.
>>
>>Simply do the first in the AfterRowColChange in the grid. E.g.
>>
>>this.Column1.ReadOnly = not myTable.CanEdit (assuming that this is table's value)
>
>My grid have 10 column. i must repeat it 10 time? am i right?
for each loColumn in this.Columns FOXOBJECT
   loColumn.ReadOnly = not myTable.CanEdit
next
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform