I have used WebListBox with DataSource approach in few WebPages already, these lists are showing records coming from Postgres database. All queries so far have included unique row identifier aka “pk”.
Today I am working on a page that is having quite complicated query due to the original design. The query starts with "SELECT DISTINCT " and there is no way for me to pull unique identifier for the each row - the row has few columns that store values coming from individual records in the same table.
I have noticed that without having “pk” specified in the query string I can still populate the WebListBox as expected. However, the “SelectionChanged” event and “Pressed” event is not firing.
If I include “pk” and populate it with something like “1” then the “SelectionChanged” event will fire only once. The “Pressed” event will fire each time but I can’t rely on the test pertaining to “SelectedRowIndex”.
I don’t think this is necessarily a bug but I can’t modify the query to include row identifier as the each row is the summerized output of 5 different rows from the same table.
Should I use “fake” number to populate the “pk” for each row? What will be the side effect if I do so?