B4XTable, Is it possible to hide one or more displayed columns?
I am testing like this with a 2 column table and I want to hide 1 column.
I am testing like this with a 2 column table and I want to hide 1 column.
B4X:
Sub cargar As ResumableSub
Dim cSq As String = $"select nombre, nombresintildes from tbObjetos where activo=1 and idbarco=? order by 1"$
'
tbSearch.Clear
tbSearch.AddColumn("Objeto",tbSearch.COLUMN_TYPE_TEXT)
tbSearch.AddColumn("Hidden",tbSearch.COLUMN_TYPE_TEXT)
Dim lll As List
lll.Initialize
'' 'Dim rs As ResultSet = ShCode.DBX.ExecQuery2(cSq,Array As String(ShCode.iBarcoPredeterminado))
Dim rs As ResultSet = ShCode.DBX.ExecQuery2(cSq,Array As String(1))
Do While rs.NextRow
Dim row(2) As Object
row(0) = rs.GetString("nombre")
row(1) = rs.GetString("nombresintildes")
lll.Add(row)
Loop
rs.Close
tbSearch.SetData(lll)
Dim lc As List = Array As String("Objeto")
tbSearch.VisibleColumns = lc
'
Return Null
End Sub
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
No partial wakelock.
*** : B4XPage_Foreground
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear
** Activity (main) Resume **
*** B4XPage_Foreground ***
No partial wakelock.
*** mainpage: B4XPage_PermissionResult [mainpage]
Error occurred on line: 566 (B4XTable)
java.lang.ClassCastException: java.lang.String cannot be cast to com.conkex.stowship.b4xtable$_b4xtablecolumn
at com.conkex.stowship.b4xtable._calculatewidths(b4xtable.java:1339)
at com.conkex.stowship.b4xtable._refresh2(b4xtable.java:1023)
at com.conkex.stowship.b4xtable._refreshnow(b4xtable.java:3555)
at com.conkex.stowship.b4xtable$ResumableSub_SetData.resume(b4xtable.java:719)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)