Sub tw_devices_SelectedRowChanged(Index As Int, Row() As Object)
Dim tmpSQL As String
Dim tmpDevice_id As String = Row(1)
Dim tmpDevice_no As String = Row(2)
'put last selected row in tw_temp
'check if IR or RF
Log(send_type)
Log( tmpDevice_id)
Log(tmpDevice_no)
tw_temp.Items.Clear
Select Case send_type
Case "IR"
'ToDo when Select works!
Case "RF"
tmpSQL = "SELECT * FROM RF_codes WHERE Device_id = ? AND Device_no = ?"
Log(tmpSQL)
DBUtils.ExecuteTableView(SQL1, tmpSQL,Array As String (tmpDevice_id,tmpDevice_no), 0, tw_temp)
Log(tw_temp.Items.Size)
End Select
Dim w As Int = Round(tw_temp.Width / tw_temp.ColumnsCount)
For i = 0 To tw_temp.ColumnsCount - 1
tw_temp.SetColumnWidth(i, w)
Next
End Sub