Problems using Weblistboxes with DataSource

I’m having problems using Weblistboxes coupled with DataSource:

  1. How to reset the component so that everything is recalculated including the construction of the columns by the ColumData method. I couldn’t find anything other than doing a “.DataSource = Self” but it doesn’t recalculate the columns. The example given does not change the columns or the SELECT part of the SQL string.
  2. Can SearchCriteria be used with Weblistboxes by DataSource? I feel like the list is restricted but the view still shows me all the records. I say that because when I click on an item in the list that is no longer part of the filter, its RowTag is not retrieved.
  3. How can we sort the columns whose formats are numeric or date. With the previous version (Web 1.0) we could do this by intercepting the sort method.
  4. How can you limit the display to 25, 50, 100, etc records per page and make the page selector appear?
  5. I have also seen that if we do not use the DataSource method, we have the possibility of displaying a search box. Can we do it in DataSource?

The best would be to have a complete example of using Weblistbox with DataSource because it becomes mandatory to go through this method since adding traditional lines has become extremely slow. I could definitely see it with the project that I am trying to port to Web 2.0 version.

Thank you in advance for your answers.

Wouldn’t there be someone to answer one of my questions? Especially number 2? I had just finished my project in Xojo 2019 in August, it was functional and since, impossible to make it work with Web 2.0. Nothing works, there is even a WebPage which totally refuses to load. I’m annoyed by that, 2 months of programming investment on Xojo and 700 € of license cost and I end up with … nothing :frowning:

Without seeing your code it is hard to advise, but here it what I can add:

  1. I don’t use DataSource, but have a Method called doRefreshXXXX that SELECTs the database RowSet, removes all existing Rows and Adds the new rows.
  2. I place my WebListBox in a tab panel, where the second panel allows you to set filter conditions (Contains, >, <, >=, <=, =, ≠, is blank, is not blank). I then apply this as SQL WHERE commands to the normal SELECT
  3. The built-in row sorting is only alphabetical, not numeric. I have a generic sort Method that checks to see if the columns holds only numbers, and so sorts numerically, otherwise it is alphabetically. I display dates in SQLDateTime format, so they sort alphabetically.
  4. You will need to do this programatically with buttons eg Previous, Next. SQL has a command (SELECT XXX FROM YYY OFFSET 999) to do this.
  5. My Search box only searches the WebListBox, not the database, so I am not sure.

Thank you for your answers. I used this technique with the 2019 version of Xojo but in 2020 it has become too slow (everything has become slower, during execution and in the IDE) that’s why I turned to the technique of WebDataSource :frowning: I need at least the possibility of relaunching the procedure for creating columns. Could the editor give future progress on the WebListbox component because it is not very usable for the moment? Construction on demand of columns and sorting columns depending on the nature These features were present in the 2019 and I got a satisfactory result.