Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 To: Labu Labi
  Where is Labu Labi?
 Negeri
 Malaysia
 Labu Labi
 Tags
Subject: RE: Disable certain rows in a grid
Thread ID: 104326 Message ID: 104329 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Grids
Date: Tuesday, August 15, 2006 7:49:55 AM         
   


> Hi guys,
>
> I wonder if we can disable certain rows in a grid? Let's say I have a grid with 10 records (rows). How to disable certain rows based on their values, eg. disable any rows having odd numbers?
>
> ~Labu
> All you have to do is search and ask!


There are usually many ways of achieving this. One way is:

You can add this code to the textbox of the grid column. In the WHEN of the textbox:

RETURN(MOD(RECNO(),2) = 0)


Now every second record in the column you have made this change cannot be edited!

Of course there are other ways but for simplicity this can't be beat since it involves just 1 line of code with no overhead of using the Dynamic properties.

ENTIRE THREAD

Disable certain rows in a grid Posted by Labu labi @ 8/15/2006 6:56:38 AM
RE: Disable certain rows in a grid Posted by Bernard Bout @ 8/15/2006 7:49:55 AM
RE: Disable certain rows in a grid Posted by Rey Magdalaga @ 8/15/2006 8:01:14 AM
RE: Disable certain rows in a grid Posted by Andy Kramek @ 8/15/2006 12:45:43 PM
RE: Disable certain rows in a grid Posted by Marcia Akins @ 8/15/2006 4:24:52 PM
RE: Disable certain rows in a grid Posted by Labu labi @ 8/16/2006 7:18:42 AM