Weblistbox sort order changed?

In API2 there appears to be no event for Weblistbox.sortorder changed.

How does one detect a sort order change?

Hello Jay,

I expected to see an equivalent event for this as well in Web 2.0. Seems the assumption is to leave the sorting to the WebListBox itself, even more so if you tie the WebListBox to a datasource.

(Not ideal), however a temporary workaround (if you want to perform other actions upon sort/re-sort) is to store the value of WebListBox.ColumnSortDirectionAt as a Property of the WebContainer or WebPage upon which the WebListBox is placed, then use a ‘client side’ WebTimer to poll and compare for changes. FYI, the SortDirection is an Enum (populated with Ascending, Descending or None).

I hope that helps.

Hey Jay,

My suggestion doesn’t work either, because the value of ColumnSortDirectionAt(ColumnIndex) does not change when the header is clicked to change the sort direction.

And beware, there’s a related bug with sorting:

WebListbox.CellAt doesn’t function after listbox has been sorted


1 Like