Sort Not Working |
Post Reply |
Author | |
faithless
Newbie Joined: 18 March 2009 Location: Turkey Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 01 June 2010 at 2:44am |
My init code:
With rc1 .Records.DeleteAll .Columns.DeleteAll .Populate .PreviewMode = True .AutoColumnSizing = True .AllowColumnSort = True Set Col = AddColumn(rc1, "", 30, False, False) Set Col = AddColumn(rc1, "", 30, False, False) Set Col = AddColumn(rc1, "COL1", 70, False, False) Col.Alignment = xtpAlignmentCenter Set Col = AddColumn(rc1, "COL2", 100, False, False) Set Col = AddColumn(rc1, "COL3", 125, False, False) Set Col = AddColumn(rc1, "COL4", 250, True, True) Set Col = AddColumn(rc1, "COL5", 300, True, True) Set Col = AddColumn(rc1, "COL6", 50, False, False) Col.Visible = False End With For lCol = 0 To rc1.Columns.Count - 1 rc1.Columns(lCol).Sortable = True Next Private Function AddColumn(ByRef p_ReportControl As ReportControl, ByVal p_Caption As String, ByVal p_MinimumWidthPx As Long, ByVal p_Resizable As Boolean, ByVal p_AutoSize As Boolean, Optional p_Sortable As Boolean = True) As ReportColumn ' This is a generic function for adding columns to the ReportControl ' It bases the starting column width on the passed miminum column width as suggested by Mark Doubson @ Codejock ' See http://forum.codejock.com/forum_posts.asp?TID=13379&PID=48715#48715 ' It also ensures that the column ItemIndex is correct by basing it on the column count at the time the column is added With p_ReportControl Set AddColumn = .Columns.Add(.Columns.Count, p_Caption, p_MinimumWidthPx - 10, p_Resizable) With AddColumn .AutoSize = p_AutoSize .MinimumWidth = p_MinimumWidthPx .Sortable = p_Sortable End With End With End Function After populate of the control clicking colums headers not sort records, it shows only small arrow down or up. |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Can you upload a small test project? So I'm able to reproduce your problem?
Thanks
|
|
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.... |
|
Jacob2
Groupie Joined: 20 May 2009 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
I have same problem.
Edit: solved. At first i used the caption property to assign text to the 'cells'. Now i'm using the value property instead and it's sorting fine. |
|
Product: Xtreme SuitePro (ActiveX) version 13.2.0
Platform: Windows 7 (64bit) Language: Visual Basic 6.0 / .NET 2008 / .NET 2010 |
|
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 |