By using the dwcontrol.SetColumn(column) function which sets the current column in a DataWindow control or DataStore and returns 1 if it succeeds and -1 if an error occurs. If column is less than 1 or greater than the number of columns, SetColumn fails. Also using the dwcontrol.GetColumnName( ) function which obtains the name of the current column.
So all you need to do is set a loop to start at column 1 until the SetColumn function returns a -1 and get every column name for the SetColumn function that returns a 1:
Int li_column = 1
Ls_column_name
Do until dwcontrol.SetColumn(li_column) < 0
Ls_column_name = dwcontrol.GetColumnName( )
Li_column++
loop
to get the column type you will need to use the objectname.ColType property, and you already have the datawindow and column name so it will look like this:
ls_coltype = dwcontrol.Describe(ls_col_name + ".ColType"
so put everything together and it should look like this
Int li_column = 1
Ls_column_name
String ls_coltype
Do until dw_1.SetColumn(li_column) < 0
Ls_column_name = dw_1.GetColumnName( )
ls_coltype = dw_1.Describe(ls_col_name + ".ColType"

Li_column++
loop
Hope this helped.
Regards
Tentacle