Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ahsan Rana
  Where is Ahsan Rana?
 Lahore
 Pakistan
 Ahsan Rana
 To: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 Tags
Subject: RE: Grid Question
Thread ID: 189326 Message ID: 189358 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Grids
Date: Thursday, August 14, 2008 3:19:13 PM         
   


> > Hi Experts
> >
> > 1. How I can set alternative back color in Grid
> > 2. After populating Grid on sys(2015), How I can select and do some thing more on its RecordSource.
> >
> > Rgds:
> > Ahsan Rana
> hi ahsan
>
> there is a property DynamicBackColor in columns object. u can write your code to give then the alternate color
> for example...
> iif(yourtable.field1=1,rgb(255,0,0), rgb(0,0,255))
>
> u can set it this individually in all columns or can do 4 all by calling setall method
> like
> thisform.yourgrid.setall( "dynamicbackcolor","iif(yourtable.field1=1,rgb(255,0,0), rgb(0,0,255))","column")
>
>
> and secondly for your grid recordsource u can select like
>
> select (thisform.yourgrid.recordsource)
> or after creating your query
> u can do just
>
> MyCursorName = Alias()
>
> then
>
> select (myCursorName)
>
>
>
> Anil
> (Fox is the solution for almost everything!!)



Here is my Command which is not working
This.SetAll("DynamicBackColor","IIF(MOD(TmpBndData.Recno(),2)=0,RGB(255,0,0),RGB(0,0,255))","Column")


> MyCursorName = Alias()

This only works if Grid RecordSourceType = 'Alias' whereas I am using 4 - SQL Statement

Rgds:
Ahsan Rana

ENTIRE THREAD

Grid Question Posted by Ahsan Rana @ 8/14/2008 12:15:53 PM
RE: Grid Question Posted by Mike Gagnon @ 8/14/2008 12:21:10 PM
RE: Grid Question Posted by Anil Sharma @ 8/14/2008 12:41:14 PM
RE: Grid Question Posted by Ahsan Rana @ 8/14/2008 3:19:13 PM
RE: Grid Question Posted by Stefan Wuebbe @ 8/14/2008 3:26:18 PM
RE: Grid Question Posted by Anil Sharma @ 8/14/2008 3:30:42 PM
RE: Grid Question Posted by Ahsan Rana @ 8/14/2008 3:50:35 PM
RE: Grid Question Posted by Anil Sharma @ 8/14/2008 5:32:24 PM
RE: Grid Question Posted by Marcia Akins @ 8/14/2008 3:41:11 PM