Link to home
Start Free TrialLog in
Avatar of pemurray
pemurray

asked on

Dynamically create datawindow columns (not from database)

Hi everyone,

I know this has been done before, but I can't seem to get the syntax right.

I have a datawindow grid that I created.  I had to pick at least one column to create the datawindow.  I then deleted the first column.  Basically, I want a blank DW in order to dynamically create my new columns.

I keep running the code below.  NO ERRORS. But no data showing up either.

Please help!!  PEM

Here is some of the code that I have been trying:

//dw_1.Modify("create column(1)")
dw_1.Modify("create column(band=detail id=1 name=1)")
//dw_original.modify('create column(name=new_column visible="1" band=detail id=' + s_id + ' x=.........')
dw_1.modify('create column(name=1 visible="1" band=detail')


dw_1.Modify("create column(2)")
dw_1.Modify("create column(3)")
dw_1.Modify("create column(4)")
dw_1.Modify("create column(5)")
dw_1.Modify("create column(6)")

newrow = dw_1.insertrow(0)

dw_1.setitem(newrow,1,5)

dw_1.Modify("t1.text="+"BERGEN")
//dw_1.Modify("object.t1.Name="+"MORRIS")

ASKER CERTIFIED SOLUTION
Avatar of diasroshan
diasroshan
Flag of Kuwait image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pemurray
pemurray

ASKER

*********HELLO ALL************

SOMEHOW I ENDED UP WITH TWO QUESTIONS

THE TITLE IS DUPLICATED FROM ONE QUESTION AND THE CONTENT IS DUPLICATED FROM A DIFFERENT QUESTION.

Diasroshan already responded to the correct question and I am working that thread.

This can be closed.

Thank you,

Paul
Hi Rosh,

I closed this question and you received the points.  Sorry, I clicked on B instead of A.  Your answer was perfect outside of the context.  Can you get an adminstrator to give you the right grade.

My apologies!!

Paul