Page 1 of 1
How to define columncontrol in GRID ?
Posted: Fri Dec 24, 2010 6:47 am
by huangchenmin
I tried to follow sample as GRID.20 for columncontrol in GRID.
The meaage error message keep displaying while .exe was executed.
Could anyone help me to find that bug?
Best Regards
Re: How to define columncontrol in GRID ?
Posted: Fri Dec 24, 2010 7:50 am
by Rathinagiri
Yes, the problem is if you want to have a combobox as the column control, you have to specify the row number in the items.
Please change your code like this
Re: How to define columncontrol in GRID ?
Posted: Mon Dec 27, 2010 7:44 am
by huangchenmin
rathinagiri wrote:Yes, the problem is if you want to have a combobox as the column control, you have to specify the row number in the items.
Please change your code like this
My Friend:
Thanks for your supports. It's real different from my imagination about "COMBOBOX". I thought COMBOBOX in GRID was able to pick up specificed item from listing. By the sample of GRID.20, HMG covert column that crossesponding to item of COMBOBOX, such as 1->"ONE"、2>"TWO".
Re: How to define columncontrol in GRID ?
Posted: Wed Dec 29, 2010 2:17 am
by huangchenmin
rathinagiri wrote:Yes, the problem is if you want to have a combobox as the column control, you have to specify the row number in the items.
Please change your code like this
What is the syntax if there are only specificed cloumns need to define COMBOBOX in GRIG ?
For example,there are 4 column in GRID_1.
There is only 3th column need to define columncontrols, I had tried syntax as follow:
COLUMNCONTROLS {,,,{COMBOBOX',['ONE','TWO','THREE']}}
It did not work!
PLS HELP!
Best Regards
chen min
Re: How to define columncontrol in GRID ?
Posted: Wed Dec 29, 2010 4:21 am
by Rathinagiri
Hi,
If you specify columncontrol for one column, you have to specify for all columns. However, if you don't want the user to enter inside a column, you can use columnwhen specification. For example,
columncontrols {{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'},{'COMBOBOX',{'One','Two','Three'}}}
columnwhen {{||.f.},{||.f.},{||.f.},{||.t.}}
Re: How to define columncontrol in GRID ?
Posted: Wed Jan 05, 2011 8:38 am
by huangchenmin
rathinagiri wrote:Hi,
.....
columncontrols {{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'},{'TEXTBOX','CHARACTER'},{'COMBOBOX',{'One','Two','Three'}}}
columnwhen {{||.f.},{||.f.},{||.f.},{||.t.}}
Sorry for replying late.
I am busy working on COMBOBOX in GRID, and eventually it is done.
It is successful due to your supports.
There comes another issue ,COLUMNVAILD syntax, for following processs after specificed nitem in combobox was selected.
Please help me to code right at line 89.
Best Regards
chen min
Re: How to define columncontrol in GRID ?
Posted: Wed Jan 05, 2011 8:45 am
by Rathinagiri
No problem,
Like the same way you have defined columnwhen, the same way you can define the columnvalid too.
Change like this.
Code: Select all
COLUMNVAILD {{||.t.},{||.t.},{||.t.},{||.t.},{||.t.},{||.t.},{||.t.},{||callresult()}}
Also, callresult() function should return either .t. or .f. ie to allow/disallow the user entry.
Re: How to define columncontrol in GRID ?
Posted: Wed Jan 05, 2011 9:18 am
by huangchenmin
rathinagiri wrote:No problem,
......................
Also, callresult() function should return either .t. or .f. ie to allow/disallow the user entry.
Thanks for your supports.
I had modified missopdt.prg as line 89 like the way you did.
COLUMNVAILD {{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||callresult()}}
The error message keep displaying as "E0300 Syntax error as '{' "
Please help.
Best Regards
chen min
Re: How to define columncontrol in GRID ?
Posted: Thu Jan 06, 2011 7:33 am
by huangchenmin
huangchenmin wrote:rathinagiri wrote:No problem,
COLUMNVAILD {{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||.T.},{||callresult()}}
chen min
OK!
This is not a joke.
I did a stupid mistake for typed 『COLUMNVALID』 as 『COLUMNVAILD』
Best Regards
chen min