How to Check whether column is sorted or not in ListView

Class library usage, coding and language questions.
saurabh
Posts: 20
Joined: Fri Jul 20, 2007 1:11 pm
Location: India
Contact:

How to Check whether column is sorted or not in ListView

Post by saurabh » Wed Aug 08, 2007 8:33 am

In my application I am sorting the column using ClickColumn() Method.Now i want to check whether the clicked column is sorted or not so how can i do it?I am using RanorexNET.dll of RanorexPro version.Like if i have clicked Date-Time Column in my ListView so how can I check that the Date-Time Column is sorted.Please provide me exact code ASAP.
Thanks in Advance!
Regards,
Saurabh Shrivastava
GE Global Research
Bangalore India

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Wed Aug 08, 2007 9:12 pm

...i want to check whether the clicked column is sorted or not so how can i do it?
I think you have only one possibility:
Read all items of the ListView and check every item with the previous one.
If you find no problem, then the list is sorted.

Jenö
Ranorex Team

saurabh
Posts: 20
Joined: Fri Jul 20, 2007 1:11 pm
Location: India
Contact:

Unable to get sorting property

Post by saurabh » Mon Aug 13, 2007 12:51 pm

How can we check item wise because there are several kind of column like Date-Time,Integer and String so for each column we have to write different sorting code.

There is one properties of ListView called Sorting (to Gets or sets the sort order for items in the control) is vailalabe as you have metioned in help for Ranorexpro version.I am using Ranorexpro1.2 but i am not getting that property.I think some how this property will help us to check sorting
Regards,
Saurabh Shrivastava
GE Global Research
Bangalore India

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Tue Aug 14, 2007 7:08 pm

There is one properties of ListView called Sorting ...
The Sorting property sorts items based on the item text (first column), you cannot use this property for the other columns. If you sort the items in the ListView based on a subitem property, then the ListView items are sorted manualy with the Sort method.
How can we check item wise because there are several kind of column like Date-Time,Integer and String so for each column we have to write different sorting code.
Yes, this is right, you have to write a checking function for each kind of column.

Jenö
Ranorex Team