>>>>>thisform.grid1.SetAll('ReadOnly',IIF(CanEdit=1, .F., .T.),'Column') >>>>>>>>>>But this not work properly.
>>>>>thisform.grid1.SetAll('Enabled',IIF(CanEdit=1, .F., .T.),'Column') >>>>>>>>>>But this destroyed my grid.
>>for each loColumn in this.Columns FOXOBJECT >> loColumn.ReadOnly = not myTable.CanEdit >>next>
>thisform.grid1.SetAll('ReadOnly',IIF(CanEdit=1, .F., .T.),'Column') >It won't change the behavior, but this code is a simpler version of your code:
thisform.grid1.SetAll('ReadOnly',CanEdit=0,'Column')