Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 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: 104360 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: Grids
Date: Tuesday, August 15, 2006 12:45:43 PM         
   


> 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!


One thing you must remember is that a VFP Grid is NOT a spreadsheet! It only ever has ONE row (the active row) all of the other things you see are static. So the question is not 'how can I disable certain rows' but 'how can I disable the CURRENT row'. Once you get your head around this little fact, a lot of the grid's apparently weird behavior makes sense :)

As others have said there are many ways of doing this, but basically you need to test some condition in the recordsource and make the grid behave accordingly.


Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA

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