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
    3.6 KB · Views: 2,042
  • xnGrid2xx_1.png
    xnGrid2xx_1.png
    77.2 KB · Views: 5,090
  • xnObjects267.zip
    75.7 KB · Views: 776
  • xnObjects272.zip
    87.2 KB · Views: 582
  • xnObjects273.zip
    87.5 KB · Views: 678
  • xnObjects276.zip
    87.2 KB · Views: 1,413
Last edited:

aviario

Active Member
Licensed User
Longtime User
I get the same error when I have the grid loaded and change the height of a row

thanks
 

stefanobusetto

Active Member
Licensed User
Longtime User
@magi6162
without db i could suggest to try this
minimal code and upper case field names
:)

B4X:
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
 

stefanobusetto

Active Member
Licensed User
Longtime User
@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

Active Member
Licensed User
Longtime User
@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

  • Pruebagrid.zip
    312.1 KB · Views: 155
Last edited:

stefanobusetto

Active Member
Licensed User
Longtime User
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

  • Main.zip
    3.5 KB · Views: 168

stefanobusetto

Active Member
Licensed User
Longtime User
touch the scrollbar at the right side of the grid
keep the finger on the display and move it
up or down
:)
 

stefanobusetto

Active Member
Licensed User
Longtime User
What do you mean? Some columns to the left always visibile when scrolling horizontally?

Try PixelFix = true
for the grid problem
 

stefanobusetto

Active Member
Licensed User
Longtime User
i'll have a look
but i'm quite sure the current
implementation of the grid is quite
incompatible with the desired feature
:)
 

stefanobusetto

Active Member
Licensed User
Longtime User
Yes it is possible.
Can't tell if i'm adding the feature
or when. I'm working on multiline
rows now.
:)
 

aviario

Active Member
Licensed User
Longtime User
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:

aviario

Active Member
Licensed User
Longtime User
Thanks, I checked it with version 2.5 works ok
 

Attachments

  • TabGrid.zip
    2.5 KB · Views: 161

TheMightySwe

Active Member
Licensed User
Longtime User
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
 
Top