Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm using ArcMap 9.3.

Shift the rows order display (ascending/descending) for a given field is as simple as double clicking on the screen.

However I'd like to know how to perform this simple operation through automation, in my case, using VBA code.

I've done searches over several interfaces such as ITableDefinition, ITableSort, IIndex with no success. ITableSort does exactly this but I did not find out an interface to pass its arguments to IDisplayTable.

Can someone help me find the parameters to pass?

share|improve this question

1 Answer 1

I believe the Interface ITableSort does not actually sort the table, it returns lists or cursors of sorted data, which is subtly different.

This has been discussed as far back as 2007 as shown in these ESRI forum threads:

http://forums.esri.com/Thread.asp?c=93&f=993&t=212789

http://forums.esri.com/Thread.asp?c=93&f=988&t=238000

One suggestion is you reconstruct a table of your sorted data. If that is a solution and you have an Advanced license level, you are better off calling the geo-processing tool Sort.

The ArcMap GUI is doing something clever which I cannot see how you would hook into and refresh. If anyone does know how to do it, it would be great to see as I've never been able to work how to refresh the display of a sorted table!

share|improve this answer
    
I think reconstruct the whole table for showing purposes doesn't pay. Anyway, thanks a lot for your prompt response Hornbydd. –  Cesar Vasini Aug 12 at 21:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.