Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Sorting problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sorting problem

 Post Reply Post Reply
Author
Message
AbhishekGoenka View Drop Down
Newbie
Newbie


Joined: 31 March 2008
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote AbhishekGoenka Quote  Post ReplyReply Direct Link To This Post Topic: Sorting problem
    Posted: 29 April 2008 at 3:09am

I am using Report control

I applied the sort command by clicking on the column header. The view is changed. but when I traverse the row programically I found the same sequence as before sorting

How the change the sequence of rows when sorting is applied
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: 29 April 2008 at 6:28am
Hi,
 
When adding records to the ReportControl they will have an index in the order you added them, OK?
 
If you sort a column, the index of a record does not change, only the order will change. If you want to traverse the ReportControl as you see them you have to traverse the ReportRows.
 
Just to give you an example to see the difference when a column has been sorted. Just add a few records to ReportControl and call ShowDifference. Sort one column and call ShowDifference again. The first time you will have 0,1,2,3,4,5 after sorting you will have a different values. 
 
Private Function ShowDifference() 
    Dim row As ReportRow
    For Each row In wndReportControl.Rows
        MsgBox row.record.Index
    Next row
End Function
 
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.189 seconds.