Page 1 of 1
WebTable
Posted: Wednesday 20th July 2022 7:30pm
by BruceSteers
Does anyone know how to fill a WebTable ?
Seems odd there's AddColumn and other column stuff yet no Row stuff at all ?
Any examples / advice welcome
Cheers
Bruce
Re: WebTable
Posted: Thursday 21st July 2022 1:50pm
by BruceSteers
It's okay i have the answer now...
It's all in the WebTable_Data() event
The Data event triggers for each cell in the table on refresh.
You add Rows by simply setting the .Count property
then handle everything in the Data event...
Something like this....
Public sFiles As String[]
Public Sub WebForm1_Open()
WebTable1.Columns.Count = 2
WebTable1.Columns[0].Text = "Type"
WebTable1.Columns[1].Text = "Name"
sFiles = Dir("/readable_dir")
WebTable1.Count = sFiles.Count
End
Public Sub WebTable1_Data(Row as Integer, Column As Integer, Data As WebTableData)
Select Column
Case 0
Data.Text = if(IsDir("/readable_dir" &/ sFiles[Row]), "Dir", "File")
Case 1
Data.Text = sFiles[Row]
End Select
End