Sorted ListCtrl does not display Values correctly

G

Guest

I have a dialog which contains a tree & list Control. On clicking, of tree item, the list ctrl list changes.
The list ctrl has 2 fields(Name & Value) & is of 'Report' Type.
The list ctrl data is filled from Objects of a class CMyCLass which consists of Members -Name & Value
Everything worked fine, but when i changed the List Ctrl with 'Sort Ascending' property checked, then the value displayed against the NAME is incorrect. If this 'Sort Ascending' Property is not set in RC , then, the behavior is correct.
Can anyone tell me what the reason can be
Thanks:)
 
D

David Lowndes

I have a dialog which contains a tree & list Control. On clicking, of tree item, the list ctrl list changes.
The list ctrl has 2 fields(Name & Value) & is of 'Report' Type.
The list ctrl data is filled from Objects of a class CMyCLass which consists of Members -Name & Value.
Everything worked fine, but when i changed the List Ctrl with 'Sort Ascending' property checked, then the value displayed against the NAME is incorrect. If this 'Sort Ascending' Property is not set in RC , then, the behavior is correct.
Can anyone tell me what the reason can be?

Since you don't show your code, I can only guess that you're not using
the return value from InsertItem as the index when you set the
sub-item text.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top