Author Topic: Reportview column header  (Read 3133 times)


  • Newbie
  • *
  • Posts: 42
Reportview column header
« on: August 28, 2013, 01:57:30 am »
I'm using a report view with headers and I've used some code I found in the database for sorting the columns when the header is clicked. It's working fine except the part that re-names the header. It updates the 1st columns to be ASCENDING or DESCENDING as appropriate. However, if this isnt appropriate if the user clicks the second or third column. How can I tell which header the user clicks on so I can update the appropriate column?



  • Sr. Member
  • ****
  • Posts: 349
Re: Reportview column header
« Reply #1 on: August 28, 2013, 07:09:57 am »
if you capture the MSG_RVHEADER event, the column header name that was clicked on is in the fifth callback parameter.  Or as the help file puts it:

Column Click: User has used the mouse to click a column header of a REPORTVIEW control. The one based column number of the clicked column is passed to the callback UDF/UDS in the callback's fifth parameter. The event is fired before the indicated column is sorted so the sort direction can be controlled by setting or changing the sort direction style of the control during the callback. Sorting is effectively cancelled by removing both sorting related styles from the control.

The mind is everything; What you think, you become.


  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: Reportview column header
« Reply #2 on: August 28, 2013, 09:34:37 am »
In your MSG_RVHEADER (22) event, you can look at the fifth parameter of your dialog callback function (MyDialog_ChangeInfo) to see what number is the column that was selected.

Code: Winbatch
     case MSG_RVHEADER
        selectedCol = MyDialog_ChangeInfo
        Pause('Selected Column Number',selectedCol)                            
Deana F.
Technical Support
Wilson WindowWare Inc.