WebListBox.AddRow
From Real Software Documentation
Method
| This method is only available for Web applications. |
Adds a new row to the WebListbox.
Notes
The AddRow method allows you to pass in multiple strings as separate parameters. Each parameter will be placed into the its corresponding column in the new row starting with the first column.
Example
The following example adds a new row to a three-column Listbox. This is possible because of the use of the ParamArray keyword.
ListBox1.AddRow("Row1", "Row2", "Row3")
See also the WebListBox example project that is included in the Examples directory with the software. It also illustrates the use of the ParamArray keyword to support a multicolumn WebListBox. A Button is used to populate a row with the contents of two TextFields. This is its Action event.
If PeopleList.ListIndex = -1 Then
'The WebListBox.AddRow method allows you to pass multiple parameters
'to add values to other columns of the new row
PeopleList.AddRow(FirstNameField.Text, LastNameField.Text)
Else
PeopleList.Cell(PeopleList.ListIndex, 0) = FirstNameField.Text
PeopleList.Cell(PeopleList.ListIndex, 1) = LastNameField.Text
End If
'The WebListBox.AddRow method allows you to pass multiple parameters
'to add values to other columns of the new row
PeopleList.AddRow(FirstNameField.Text, LastNameField.Text)
Else
PeopleList.Cell(PeopleList.ListIndex, 0) = FirstNameField.Text
PeopleList.Cell(PeopleList.ListIndex, 1) = LastNameField.Text
End If
