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: 189368 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Grids
Date: Thursday, August 14, 2008 3:50:35 PM         
   


> >
> >
> >
> > 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")
> >
> >
> >
> > This only works if Grid RecordSourceType = 'Alias' whereas I am using 4 - SQL Statement
> >
> > Rgds:
> > Ahsan Rana
>
> Hell Ahsan
>
>
> the command Should be like that
> This.SetAll("DynamicBackColor","IIF(MOD(Recno('TmpBndData'),2)=0,RGB(255,0,0),RGB(0,0,255))","Column")
>
> other thing u wrote this.setall so that command should be somewhere in form's
> method!.
>
> Well if u rusing sql statement is u have give the cursor name too? if not than
> give to it like
>
> select * from abc into cursor xyz
>
> that will populate ur grid with data and that will create cursor name xyz
> so u can use xyz for further calculation!. if u does include the name of
> cursor in query it will make a cursor named "query"
>
>
>
>
> Anil
> (Fox is the solution for almost everything!!)


Thnx Anil
Alternative Color option is working now. and 2nd one is
MyGrid.RecordSourceType = 4 - SQL Statment
and My Sql Statement is
Thisform.Grid1.RecordSource = "Select From into Cursor sys(2015)"
This is only due to Uniqness of RecordSource. And now if I want to do some thing after displaying Grid then how I can select RecordSource.

One thing more, How Grid can auto adjust colums with Field width

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