B4A Library Grid/Table and ListView Library

robh

Member
Licensed User
Longtime User

No problem, glad I can be of help.
I also had the same problem with the .Clear method.
 

mrjaw

Active Member
Licensed User
Longtime User
I am trying to use the example but I get the error
B4X:
Compiling code.                         Error
Error parsing program.
Error description: Unknown type: xneditdate
Are you missing a library reference?
Occurred on line: 12
Dim edit_date1 As xnEditDate
 

robh

Member
Licensed User
Longtime User
Improvement

Hi Steffano,

Really good grid library, excellent stuff. Could I make a suggestion for a slight improvement, i don't know if this is possibly. The grid has a tendancy to want to scroll horizontal when attempting to scroll vertical. To achieve a vertical scroll it seems the user has to be very precise with vertical on screen touch. To improve this somewhat, could some code be introduced to analyze the the horizontal deviation on touch start and touch end and say if it's less than x number of pixels, assume the user wanted to vertically scroll?

Again, thanks for your efforts with this library, it's much appreciated.
 

Arun

Member
Licensed User
Longtime User
.isdate giving error in xnGridSample

I downloaded the xnGridSample.zip and xnObjects163.zip

I tried to run it using debug mode and got the following error

Compiling code. Error
Error compiling program.
Error description: Unknown member: isdate
Occurred on line: 298
If u.IsDate ( s , "dd-MM-yyyy" ) Then
Word: isdate

What am I doing wrong?

b4a ver 2.25
xnObjects lib is selected
Device is 7"tab running ICS

I am a noob so please assume that it is my error/oversight.

Thanking you in advance
 

stefanobusetto

Active Member
Licensed User
Longtime User
no pal
it's my mistake!
sorry, i've extended the lib
added some more functions and forgot to
update the example

try
B4X:
u.StringIsDate2(...)
 

Arun

Member
Licensed User
Longtime User
.isdate problem solved

I appreciate the prompt reply. It is working now.

Thanks for a great product.
 

StarinschiAndrei

Active Member
Licensed User
Longtime User

I wnted to try your grid but i got an error during compile
Compiling code. Error
Error compiling program.
Error description: Unknown member: isdate
Occurred on line: 298
If u.IsDate ( s , "dd-MM-yyyy" ) Then
Word: isdate

could you please tell me why ?

Thanks
 

pixelpop

Active Member
Licensed User
Longtime User
Where can I find the xnGridSample.zip that a previous poster referenced? Thanks!
 

stefanobusetto

Active Member
Licensed User
Longtime User
Have a look at the top post.
You can find it between the other zips.

Inviato dal mio GT-I9300 con Tapatalk 2
 
Last edited:

ibrikci

New Member
Licensed User
Longtime User
I got an error when compiling sample

Compiling code. 0.02
Compiling layouts code. 0.00
Generating R file. Error
AndroidManifest.xml:18: error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize').
 

stefanobusetto

Active Member
Licensed User
Longtime User
Sample code for xnObjDate

B4X:
Dim o As xnObjDate
Log ( o.IsNull )

o.FormatSql     = o.Format_YYYYMMDD
o.FormatDisplay = o.Format_YYYYMMDD_DOT

o.Value = DateTime.Now
Log ( o.ValueAsSql )
Log ( o.ValueAsDisplay )

o.Clear
Log ( o.IsNull )

o.ValueAsDisplay = "2012.12.12"
Log ( o.ValueAsSql )
Log ( o.ValueAsDisplay )

o.Clear
Log ( o.IsNull )

o.ValueAsSql = "20120101"
Log ( o.ValueAsSql )
Log ( o.ValueAsDisplay )

o.Clear
Log ( o.IsNull )

Log ( o.SetAsStringDisplay ( "dummy" ) )
Log ( o.SetAsStringDisplay ( "2012.12.12" ) )

Log ( o.SetAsStringSql ( "dummy" ) )
Log ( o.SetAsStringSql ( "20120101" ) )

Log ( o.SetAsStringSql ( "null" ) )
Log ( o.ValueAsSql )
Log ( o.ValueAsDisplay )

Log ( o.SetAsStringDisplay ( "..." ) )
Log ( o.ValueAsSql )
Log ( o.ValueAsDisplay )
 

androidvh

Member
Licensed User
Longtime User
AppendRow

Hallo I still have a question to the following syntax:


Dim Tr As TextReader
Dim kZeile As String
Dim aSpalten(col) As String col is a known index

Tr.Initialize(File.OpenInput(File.DirAssets, "demo.txt"))
kZeile = Tr.ReadLine
Do While kZeile <> Null
Dim fZeile() As String
If kZeile.Length > 0 Then
fZeile=Regex.Split(";", kZeile)
For i = 0 To col - 1
aSpalten(i) = fZeile(i)
Next
' Tabelle.AppendRow(Array As String(aSpalten)) line doesn´t work
Tabelle.AppendRow(Array As String(fZeile(0), fZeile(1), fZeile(2)....) this line work
End If
kZeile = Tr.ReadLine
Loop
Tr.Close

with Tabelle.AppendRow(Array As String(aSpalten)) the grid is empty
with Tabelle.AppendRow(Array As String(fZeile(0), fZeile(1),..etc. it´s ok

so what is wrong ?

kind regards Volker
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…