
MichelBujardet (Michel Bujardet) March 12, 2016, 7:19am 17 quote252808: Alexandre CunhaHi I’ve implemented this code: dim i as integer for i0 to lbx. The SortListbox function is triggered in the HeaderPressed event handler of the WebListbox. for i0 to lbx.RowCount-1 dim strJS as string. If tempString "" And tempString str(tempString.val) And tempString.val 0 Then Me.ListIndex = 0 'highlight the first row TempString = ReplaceAll(tempString, " ", "") 'remove spaces

TempString = ReplaceAll(tempString, ",", "") 'remove commas TempString = Uppercase(Me.Cell(tempInt, tempInt2)) If sortColumn = tempInt2 And numericalColumn Then
#Xojo weblistbox rowcount 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) In digging through the OLR, I discovered that Listbox.List should return the entire row as a string including all column contents for that row. If fieldExistsInTable(memoryDB, "sortTable", "myRowTag") Then rec.Column("myRowTag") = Me.RowTag(tempInt) I’m looking for a less complex mechanism for building a string based on the column contents of a listbox row. '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)

We are currently planning to ship this updated Web framework in Xojo 2023r2.
#Xojo weblistbox rowcount upgrade
Bootstrap continues to improve and as a result we are working to upgrade the Web framework to the latest version. Bootstrap is the toolkit the Xojo Web framework uses to create the UI controls for your web projects. 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 Bootstrap 5 is Coming to the Xojo Web Framework. 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.
