Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - The current column on click?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

The current column on click?

 Post Reply Post Reply
Author
Message
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Topic: The current column on click?
    Posted: 11 July 2011 at 5:01am
Hi,
How
 do I know the current column when I click on the Report Control
?
I would know exactly on "SortOrderChanged" event.
Thank's to all

Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 10:28am
Help! I'm stuck for this problem! Cry
Any solution?
Thank's
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 11:28am
Does the FocusedColumn property provide the information you need?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 11:32am
Hi,
 
If you have just one sorted column at a time, SortOrder collection contains sorted columns by code or user clicked column (in this case index=0)
 
 
Private Sub wndReport_SortOrderChanged()
    Debug.Print Me.wndReport.SortOrder(0).ItemIndex 'column index (meaning the ''original" index when you added it not the index in current view!!!)
End Sub
 
 
btw I maybe a little older but you can use a smaller font, I can still read it LOL
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 12:00pm
Originally posted by jpbro jpbro wrote:

Does the FocusedColumn property provide the information you need?

Hi,
unfortunately the property does not return the "SortOrder" column.
Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 12:08pm
Thank You for your help!
How do I set the code through a sort column?
I try this but don't work: 
wndReport.SortOrder(0).ItemIndex = 2

PS: sorry for the big font ... damn "Copy and Past" Embarrassed
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 12:13pm
Originally posted by g.novi g.novi wrote:

Thank You for your help!
How do I set the code through a sort column?
I try this but don't work: 
wndReport.SortOrder(0).ItemIndex = 2

PS: sorry for the big font ... damn "Copy and Past" Embarrassed
 
Hi,
 
Just add column to SortOrder collection
 
    wndReportControl.SortOrder.DeleteAll 'just in case you need total new sort
    wndReportControl.SortOrder.Add Me.wndReportControl.Columns(0)
    wndReportControl.Populate
 
You can add as many columns as you need and will be sorted in the order you added them to SortOrder (see Help for SortOrder Wink)
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
g.novi View Drop Down
Groupie
Groupie


Joined: 27 October 2009
Location: Italy
Status: Offline
Points: 38
Post Options Post Options   Thanks (0) Thanks(0)   Quote g.novi Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2011 at 12:34pm
Originally posted by Aaron Aaron wrote:


Just add column to SortOrder collection
 
    wndReportControl.SortOrder.DeleteAll 'just in case you need total new sort
    wndReportControl.SortOrder.Add Me.wndReportControl.Columns(0)
    wndReportControl.Populate
 
You can add as many columns as you need and will be sorted in the order you added them to SortOrder (see Help for SortOrder Wink)
 

OK! Thank You
Bye
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.266 seconds.