B4A Library Grid/Table and ListView Library

This library allows to create easely grids/tables and
from version 2.50
list views too!
Enjoy!
:)

The original post has been moved
http://www.b4x.com/android/forum/threads/grid-library.16381/page-10#post-168452"

Version 2.50 beta
- Added support for multiline rows

Version 2.51 beta
- Bug fixes

Version 2.52 beta
- Added Typeface support for rows and hedaer

Version 2.53
- Added SingleLine property for columns

sample code and usage hints can be found here
http://www.b4x.com/android/forum/threads/grid-library.16381/page-15#post-194602

Version 2.55
- Added object b4aActivityContext

Version 2.56
- Added and modified event hendlers
https://www.b4x.com/android/forum/threads/grid-and-listview-library.16381/page-19#post-297198

Version 2.57
- Added Columns Builders
https://www.b4x.com/android/forum/threads/grid-and-listview-library.16381/page-19#post-299406

Version 2.58
- Bug fixes

Version 2.59
- Added RowHeight for each column
- Added HeaderHeight for each column
https://www.b4x.com/android/forum/threads/grid-and-listview-library.16381/page-19#post-304465

Version 2.60
- Added TouchX() and TouchY()
- Added FirstVisiblePosition() and LastVisiblePosition()
https://www.b4x.com/android/forum/threads/grid-and-listview-library.16381/page-19#post-304905

Version 2.65
- Added Button Columns
https://www.b4x.com/android/forum/threads/grid-and-listview-library.16381/page-19#post-306507

Version 2.67
- Added CellProps event
- Removed PropSetColor / PropSetTextColor
https://www.b4x.com/android/forum/threads/grid-table-and-listview-library.16381/page-19#post-307490

Version 2.71
- Added OnSelectAllow event
- Added selection on row background
https://www.b4x.com/android/forum/threads/grid-table-and-listview-library.16381/page-21#post-347618

Version 2.73
- Added OnRowProps event
https://www.b4x.com/android/forum/threads/grid-table-and-listview-library.16381/page-21#post-349404

Version 2.76
- Fixed dubug log bug
https://www.b4x.com/android/forum/threads/grid-table-and-listview-library.16381/page-21#post-375965

If you like my grid.
You can support the development.


 

Attachments

  • xnGridSample200beta.zip
    xnGridSample200beta.zip
    3.6 KB · Views: 2,749
  • xnGrid2xx_1.png
    xnGrid2xx_1.png
    77.2 KB · Views: 5,974
  • xnObjects267.zip
    xnObjects267.zip
    75.7 KB · Views: 1,511
  • xnObjects272.zip
    xnObjects272.zip
    87.2 KB · Views: 1,296
  • xnObjects273.zip
    xnObjects273.zip
    87.5 KB · Views: 1,384
  • xnObjects276.zip
    xnObjects276.zip
    87.2 KB · Views: 2,187
Last edited:
I get the same error when I have the grid loaded and change the height of a row

thanks
 
@magi6162
without db i could suggest to try this
minimal code and upper case field names
:)

Code: Copy
grdS.Initialize("GS")
    Activity.LoadLayout("Storico")
    Activity.AddMenuItem("Barra di scorrimento","BarraOnOff")

    cursorS = Main.gecoDB.ExecQuery("select STORICO.IDSTORICO as IDSTORICO " & _
                                     "from STORICO " & _
                                     "Order By STORICO.RAGSOC ASC")

    bmpSortUp.Initialize ( File.DirAssets, "Sort-Ascending.ico" )
    bmpSortDown.Initialize ( File.DirAssets, "Sort-Descending.ico" )
    
    cc(0).Initialize2("IDSTORICO","IDSTORICO",0dip,Gravity.CENTER_HORIZONTAL + Gravity.CENTER_VERTICAL)
    grdS.ColAppend(cc(0))

    grdS.CursorAppend(cursorS)
    
    pnlGrd.AddView ( grdS , 0dip , 0dip , 100%x, 100%y)
    grdS.GridCreate
 
@aviario
I've tested the GridCreate2 method with both true and false param.
I've also tested the PropSetHeight calling it before and after
GridCreate2 but i've not been able to get the errors.
I can suggest to:
1) initialize the grid
2) initialize and add the grid columns
3) fill the grid
4) create the grid
You can then:
a) test if a row exists
b) set the height of the row
I'll be glad to have a look at your code if you post it or send by email.

:)
 
@aviario
I've tested the GridCreate2 method with both true and false param.
I've also tested the PropSetHeight calling it before and after
GridCreate2 but i've not been able to get the errors.
I can suggest to:
1) initialize the grid
2) initialize and add the grid columns
3) fill the grid
4) create the grid
You can then:
a) test if a row exists
b) set the height of the row
I'll be glad to have a look at your code if you post it or send by email.

:)

This is an example

thanks
 

Attachments

Last edited:
Great problem!
:):):)

I've been able to reproduce it with the code you've posted.
I've also been able to create your grid pasting your code in
my xnGridTest example app.

I'll work on it.
Really strange indeed!
 

Attachments

What do you mean? Some columns to the left always visibile when scrolling horizontally?

Try PixelFix = true
for the grid problem
 
i'll have a look
but i'm quite sure the current
implementation of the grid is quite
incompatible with the desired feature
:)
 
Hi, When I put two grid in a tabhost me sample the first but the second if I put cgrid1.GridCreate2 (False) shows me the head but not the data and if I put cgrid1GridCreate2 (True) shows nothing


thanks
 
Last edited:
Tag property on a row?

Do you think it's possible to get a "Tag" property on the rows just to store a data ID or something?

Regards,

Jonas
 
Back
Top