
XOJO WEBLISTBOX SORT CODE

TempString = ReplaceAll(tempString, " ", "") 'remove spaces TempString = ReplaceAll(tempString, ",", "") 'remove commas TempString = Uppercase(Me.Cell(tempInt, tempInt2)) If sortColumn = tempInt2 And numericalColumn Then
XOJO WEBLISTBOX SORT FULL
'check If the chosen column is full of only numerical data Rec.Column("m圜olumn" + str(tempInt2)) = Me.Cell(tempInt, tempInt2) If fieldExistsInTable(memoryDB, "sortTable", "m圜ellTag" + Str(tempInt2)) Then rec.Column("m圜ellTag" + Str(tempInt2)) = Me.CellTag(tempInt, tempInt2) If fieldExistsInTable(memoryDB, "sortTable", "myRowTag") Then rec.Column("myRowTag") = Me.RowTag(tempInt) 'place the WebListBox data into the databaseįor tempInt As Integer = 0 to Me.RowCount - 1 rec = New DatabaseRecordįor tempInt2 As Integer = 0 to Me.ColumnCount - 1 If memoryDB.Error Then Return 'not sure why we got an error, but leave the table alone TempSQL = tempSQL + “extraSortColumnWAD DOUBLE” TempSQL = tempSQL + "m圜ellTag" + Str(tempInt) + " TEXT COLLATE NOCASE, " If Me.CellTag(0, tempInt).StringValue "" Then TempSQL = tempSQL + “m圜olumn” + str(tempInt) + " TEXT COLLATE NOCASE, " //Ajouter le cellTag

TempSQL = tempSQL + “myRowTag” + " TEXT COLLATE NOCASE, "įor tempInt As Integer = 0 to Me.ColumnCount - 1 If rsf.Field(“ColumnName”).StringValue = fieldName Thenįunction 2 : SortListbox(sortColumn As Integer) Some comments are in french but you should find your way around…įunction 1 : fieldExistsInTable (db As SQLiteDatabase, tableName As String, fieldName As String) As Boolean Hopefully it can be usefull for someone… So thanks again to David Cox for creating the main part of this code. It surely can be optimized and by the way, let me know if you do so :).

I use two Functions in a subclassed WebListbox. It works well with Strings, dates and numbers.

I modified David Cox 's function for sorting WebListBox ( Link to conversation) so it can take into account RowTags and CellTags as well.
