I have a tableview with 9 columns and pass form values to an array of 9 objects as seen in the code below.
sdate is a string and dDate is a long for the tick value. The sDate for for a tablerow element to display a familiar date format (2015-01-01) but I am storing the dDate long value (ticks) in an mysql DB.
However, when I use this - tblCB.Items.Add(Arow) with arow(1) being an sdate (2015-01-01) it displays that element in my table is tick value! cant understand why?
The Log clearly show format as 2015-01-01 but in the table is shows the tick value
sdate is a string and dDate is a long for the tick value. The sDate for for a tablerow element to display a familiar date format (2015-01-01) but I am storing the dDate long value (ticks) in an mysql DB.
However, when I use this - tblCB.Items.Add(Arow) with arow(1) being an sdate (2015-01-01) it displays that element in my table is tick value! cant understand why?
The Log clearly show format as 2015-01-01 but in the table is shows the tick value
B4X:
Dim Arow(9) As Object
Dim jo As JavaObject = dtpTransaction
' Get the value using the getValue() method
Dim sDate As String = jo.RunMethod("getValue", Null)
Dim dDate As Long = DateTime.DateParse(sDate)
Arow(0) = "E"
Arow(1) = sDate
Arow(2) = cmbPurchases.Value
Arow(3) = txtCostDesc.Text.ToUpperCase
Arow(4) = Bank
Arow(5) = "0"
Arow(6) = Net
Arow(7) = VAT
Arow(8) = False
Log("Expense " & Arow(1))
tblCB.Items.Add(Arow)
Arow(1) = dDate
'The '1' in the array after the "get" is the column number you want to justify (zero based)
Dim jo As JavaObject = tblCB
For i = 4 To 8
jo.RunMethodJO("getColumns",Null).RunMethodJO("get",Array(i)).RunMethod("setStyle",Array("-fx-alignment: CENTER-RIGHT;"))
Next