IViewSort enables the consumer to apply a sort order to a view.

Providers that can present rows in a sorted order as specified by the consumer support IViewSort. A provider may restrict functionality to orders based on existing indexes or may limit the complexity of the order.

Consumers needing a sorted view of rows call IViewSort::SetSort to apply a sort order to a view.

When a view with a specified sort order is applied to a rowset by calling IViewChapter::OpenViewChapter, a chapter handle is returned and methods that return HROWs, such as IRowset::GetNextRows or IRowsetScroll::GetRowsAtRatio using that chapter handle, return the rows in sorted order. Any resources associated with the order can be freed with a call to IChapteredRowset::ReleaseChapter.




Retrieves a sort order from a view.


Assigns a sort order to a view.

This topic is a part of: