Sorting problem |
Post Reply |
Author | |
AbhishekGoenka
Newbie Joined: 31 March 2008 Status: Offline Points: 14 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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
|
|
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 |