Left-click on column header |
Post Reply |
Author | |
paulm_wlc
Newbie Joined: 17 June 2013 Status: Offline Points: 6 |
Post Options
Thanks(0)
Posted: 17 June 2013 at 2:24pm |
I am using the report control to display a paged list of records (I'm handling the paging). One of the things I'm attempting to handle is when the user clicks on a column header, I actually need to resort on the entire file (not just the page that is currently being displayed to the user). There doesn't appear to be a left-click event for the column headers (which seems to be a weird design decision).
I did some searching and one way I found to trap this event was in the mouse down event. So I now have code that responds to this event, does a HitTest, then checks to see if the object ht = 1, then checks to see if the column is sortable. If it is, I reload the correct page of data, sorted to match the column the user just clicked. This seems to work (well, you do see the grid resort, then refresh when I load the correct page of data which isn't ideal, but it's still usable). However, during testing I noticed that ANY click inside of the column area causes this to fire - even just resizing the column headers. Any ideas on how to get this event to fire ONLY when the user left-clicks on the column header (and not when they do things like resorting)?
|
|
paulm_wlc
Newbie Joined: 17 June 2013 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
The work around I came up with (which, so far, appears to work) is I hook into the ColumnWidthChanged event and record the last fired time. Then in the mouse down I check to see if ColumnWidthChanged has fired within the last few seconds - if it has, I ignore the left-click. I'd prefer something cleaner, though.
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
Hi,
please open a support ticket. Thanks |
|
Codejock support
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |