dbTalk Databases Forums  

How to use STRTRAN function as Grid's Column ControlSource

comp.databases.xbase.fox comp.databases.xbase.fox


Discuss How to use STRTRAN function as Grid's Column ControlSource in the comp.databases.xbase.fox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kuido Külm
 
Posts: n/a

Default How to use STRTRAN function as Grid's Column ControlSource - 09-02-2004 , 10:04 AM






Hello !
I want dynamically change GRID Column but nothing changes in column2
In the Combo1 control I browse table structure
I use following code

THISFORM.abi=ALIAS()
THISFORM.Grid1.RecordSource=""
THISFORM.Grid1.RecordSource=THISFORM.abi
THISFORM.Grid1.ColumnCount=2
THISFORM.Grid1.Column1.ControlSource=THISFORM.Comb o1.Value
THISFORM.Grid1.Column2.ControlSource=STRTRAN(THISF ORM.Combo1.Value,THISFORM.Text1.Value,THISFORM.Tex t2.Value)
THISFORM.Grdi1.Refresh

Any suggestions ?

THISFORM.Text1.Value="L"
THISFORM.Text1.Value="P"
But the Column1 and Column2 are both same

Kuido

Reply With Quote
  #2  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: How to use STRTRAN function as Grid's Column ControlSource - 09-02-2004 , 04:51 PM






Kuido Külm <kuido (AT) ids (DOT) ee> wrote:

Quote:
Hello !
I want dynamically change GRID Column but nothing changes in column2
In the Combo1 control I browse table structure
I use following code

THISFORM.abi=ALIAS()
THISFORM.Grid1.RecordSource=""
THISFORM.Grid1.RecordSource=THISFORM.abi
THISFORM.Grid1.ColumnCount=2
THISFORM.Grid1.Column1.ControlSource=THISFORM.Comb o1.Value
THISFORM.Grid1.Column2.ControlSource=STRTRAN(THISF ORM.Combo1.Value,THISFORM.Text1.Value,THISFORM.Tex t2.Value)
THISFORM.Grdi1.Refresh

Any suggestions ?

THISFORM.Text1.Value="L"
THISFORM.Text1.Value="P"
^
Assuming that you meant this to be a "2".

Quote:
But the Column1 and Column2 are both same
Given the values you state and the assumption I made, the strtran
expression converts all occurrences of "L" to "P", as in:
a="WELL NOW"
b="L"
c="P"
? strtran(a,b,c) && gives "WEPP NOW"
If your string has no "L" strings in it, the strtran() makes no
changes. (RTFM on strtran().)

You did not state what you are trying to do, so I can not post
code that does what you want.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.