• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 943
  • Last Modified:

How to select entire COLUMN in datawindow

hi all :) it is easy to select eniter row but is there a way to select entire column.
When i click on any row in DW  i want it to select the column (same as when clicking on the header) i just cant find a solution anywhere :(

any help, thanks in advance
0
azana
Asked:
azana
  • 2
  • 2
1 Solution
 
sandeep_patelCommented:
Any specific reason for selecting entire column? However grid type datawindow allows that.

Regards,
Sandeep
0
 
azanaAuthor Commented:
am trying to give the user the ability to delete columns that he doesnot want :)
Ya the grid gives the ability to select entire column but only if i click on the header :( but not when clicking on the cell (or at least i cant figure how :'( )
0
 
sandeep_patelCommented:
write this in clicked event of datawindow and check. This should work for any type of datawindow. To delete the column you may need to stored the column name in instance variable when clicked and then on del key pressed or buttton pressed set visible property to false for that column

To change background color
------------------------------------

string ls_ret
long ll_count

If dwo.type = 'column' Then
For ll_count = 1 TO Long(this.object.datawindow.column.count)
      If This.Describe('#'+string(ll_count)+".name") = dwo.name Then
                  This.Modify(dwo.name+".background.mode='0'")
                  This.Modify(dwo.name+".background.color='255'")
      Else
                  This.Modify('#'+string(ll_count)+".background.mode='1'")
                  This.Modify('#'+string(ll_count)+".background.color='536870912'")
      End If
Next
End If


To delete column
----------------------
dw_name.modify(is_column+".visible='0'")

where is_column is instance variable is value should be assigned in clicked event of that datawindow as below

If dwo.type = 'column' Then
is_column = dwo.name
End If

Regards,
Sandeep
0
 
azanaAuthor Commented:
THANKS THANKS THANKS
never ever would thought to change the background color :P
:D :D :D made my day :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now