The WebListBox does not have “click on column header” event. When user clicks on the column header the list is sorted in ascending or descending order - this is all good. However, this presents certain problem. I am trying to provide user with “multi row” update - meaning user can select multiple rows in the list, open dialog, change value of some attribute and save, the list is redrawn. Since this is the DataSource driven WebListBox I can control the ORDER BY clause by appending “id” column (this one is not exposed and provides unique row identifier) to ensure the same sort after DataReload. As Ricardo suggested I use mSelectedRows() array to store selected rows identifier, this is populated in SelectionChanged event of the WebListBox control.
The problem: after DataReload the selected rows are highlighted, when user decides to click on another column to sort and is using the selected rows to open WebDialog to change something on selected rows the mSelectedRows() array will store “stale” row identifiers - this is not good.
So, if column header click event is not available what shall I do?
Needless to say that the above scenario is unacceptable as it will lead to the update of wrong records in the database. As a workaround I can clear mSelectedRows() and force the user to re-select rows in the list, but in that case how do I de-select rows in the list?