How to know style type and style name of a datawindow control.

Pb7

How to know style type and style name of a datawindow control.

Variables:
-----------
datawindow name = arg_dw
column name = ls_colname
MateenAsked:
Who is Participating?
 
diasroshanConnect With a Mentor Commented:
Hi,

mateen,the code uve pasted above is absolutely correct...

just add a drop down to ur normal column and not the virtual column... run the function and tell me if u observe any difference...

i feel since the drop down is attached to a virtual column the value returned is '?'

Cheers,
Rosh
0
 
diasroshanCommented:
Hi,

mateen... i have given the code in my previous post... guess u missed it or ur lookin for somthing else...

its,

ls_style = arg_dw.describe(ls_colname +".edit.style") //this will give u the style type... dddw or other

Cheers,
Rosh
0
 
MateenAuthor Commented:
Hi rosh,

colour_code:
edit_propery = 'edit'
but
 
colour_name
In the edit property in all of our datawindows we have got
style_name ,
style_type,
datawindow = 'dddw_colour'
display column = 'colour_name'
data column = 'colour_code'  etc

The point is, in our system, the edit property of colour_code (or other actual columns) is always edit. And in the edit property of virtual column , we define the above properties. It is to be noted , that , sometimes, style name may be missing( if I have not created style) so the key factor should be
  DATAWINDOW = 'DDDW_COLOUR'. If I could find a "datawindow name" by checking the property of the virtual column my problem would be solved. I hope, u, understand my problem.

Regards
Mateen



0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
SHFDEVCommented:
Hii
Following code will tell you that what is type of the
datawindow control

String ls_dwType

ls_dwType = This.Describe("datawindow.processing")

ls_dwType = 1 is Grid,
ls_dwType 2 is  Tabular ,etc
0
 
batchakamalCommented:
Here personcode is the column name,

string ls_name
ls_name = dw_1.describe("personcode.dddw.name")

I hope this is what u want?
0
 
MateenAuthor Commented:
Hi batchakamal

I am trying

Long     ll_count,point_position
string   ls_dddw_name,ls_colname, ls_colname2 , ls_expression

For ll_count = 1 to Long(arg_dw.object.datawindow.column.count)
     ls_colname    =  arg_dw.Describe('#'+string(ll_count)+".name")
     ls_dddw_name  = arg_dw.describe(ls_colname+".dddw.name")
     messagebox(ls_colname,ls_dddw_name)
     ls_colname2=  arg_dw.Describe(ls_colname + ".dbName")
     point_position = pos(ls_colname2,'.')
     ls_colname2=mid(ls_colname2,point_position+1)
     ls_dddw_name    = arg_dw.describe(ls_colname2+".dddw.name")
     messagebox(ls_colname2,ls_dddw_name)
Next
return true

The messagebox always show a '?' fro the variable ls_dddw_name for the entire datawindow. I expect to get two child datawindow name dddw_broker and dddw_sub_owner.

Here is some lines from the exported version of datawindow.

column(band=detail id=4 alignment="0" tabsequence=60 border="5" color="0" x="585" y="112" height="64" width="1010" format="[general]"  name=broker_name edit.name="dddw_broker"
dddw.name=dddw_broker dddw.displaycolumn=broker_name dddw.datacolumn=broker_code dddw.percentwidth=100 dddw.lines=0 dddw.limit=0 dddw.allowedit=yes dddw.useasborder=yes dddw.case=any dddw.vscrollbar=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )
column(band=detail id=6 alignment="0" tabsequence=80 border="5" color="0" x="585" y="196" height="64" width="1010" format="[general]"  name=sub_owner_name edit.name="dddw_sub_owner" dddw.name=dddw_sub_owner dddw.displaycolumn=sub_owner_name dddw.datacolumn=sub_owner_code dddw.percentwidth=100 dddw.lines=10 dddw.limit=0 dddw.allowedit=yes dddw.useasborder=yes dddw.case=any dddw.vscrollbar=yes  font.face="MS Sans Serif" font.height="-8" font.weight="400"  font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" )

The two related fields in the above text is
compute column_name                    child datawindow name
broker_name                                   dddw_broker
sub_owner_name                            dddw_sub_owner


0
 
batchakamalConnect With a Mentor Commented:
Hi,

Your above code is working fine with me.

Check the following.

When u pass arg_dw to your funtion, make sure you passing this one as Argument type  = datawindow and pass by = reference and the controls are visible  in the datawindow design.

if i delete this control from the design, it shows me also '?'

I will continue tommorrow.
0
 
MateenAuthor Commented:
Long     ll_count,point_position
string   ls_colname
For ll_count = 1 to Long(arg_dw.object.datawindow.column.count)
     ls_colname    =  arg_dw.Describe('#'+string(ll_count)+".name")
             messagebox(ls_colname,ls_colname)
Next
return true

PROBLEM:
COMPUTED COLUMN IS NOT BEING SHOWN IN MESSAGEBOX.

Does Long(arg_dw.object.datawindow.column.count) works for  physical/actual column only.




0
 
MateenAuthor Commented:
Hi dia

<<just add a drop down to ur normal column and not the virtual column>>
Now the problemetic area has been found.

How should I define the virtual column.

Please Understandard Our Practice

Actual Column              
Computed Column        child datawindow defined here.

The easiness is that ,
a) if the users knows the code , he can enter code in the Actual Column , computed column would be automatically filled.
b) he can leave actual column empty, in the computed column he will select his desired data, again both columns will be automatically filled.

<<just add a drop down to ur normal column and not the virtual column>>
Will this satisfy our needs.

Best regards
Mateen

I will continue tomorrow.



0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.