### Set Cell New Value

To set a new value in a tableview cell use the Row Object and assign new value.
Option 1 using a Sub
' Set a new value in a cell at specific row and column
' Parameter Tableview
' Parameter Row in which the new value is set
' Parameter Col in which the new value is set
' Parameter Newvalue
`Sub setTableviewNewValue(tv As TableView, Row As Int, Col As Int, newvalue As String)
' Set the selected row first
tv.SelectedRow = Row
' Get the selected row as object
Dim rowcontent() As Object = tv.Items.get(Row)
' Set the new value in the cell
rowcontent(Col) = newvalue
' Trigger to make the updated data visible in the tableview
' This more a trial and error solution - may be other (better?) solutions available
tv.SetColumnVisible(Col, False)
tv.SetColumnVisible(Col, True)
End Sub`
Example usage
setTableviewNewValue(tableview1, 0, 1, DateTime.Time(DateTime.Now))
Option 2 setting value direct in the control
Example:
Set a new value in the selected row, cell 2 of a tableview (ID: tableviewStandard) with two columns.
' Get the selected row as object
Dim row() As Object = tableview1.Items.get(tableview1.SelectedRow)
' Assign a new value to column 2 (=has an index of 1 as colcount starts with 0), called row(1)
row(1) = DateTime.Time(DateTime.Now)
' And refresh
tableview1.SetColumnVisible(1, False)
tableview1.SetColumnVisible(1, True)

Changed: 2018-03-16 18:43, Category: TableView, File: T6C259M1903.htm, ID: 1903