B4A Library Grid/Table and ListView Library

magi6162

Well-Known Member
Licensed User
Hi,
Next update?
(Ti chiedo cortesemente, se pensi di effettuare ulteriori aggiornamenti alla libreria, nel prossimo futuro)

Best work!!!
 

stefanobusetto

Active Member
Licensed User
good idea!
i've tryed to add freeze columns more than once
but i've not yet been able
may be it'll be the right time
:)
 

David Hawkins

Member
Licensed User
Hi Stefano
is it possible to get the dimensions of the a cell that has been selected i.e. Top left position, width and height.

Regards

David
 

David Hawkins

Member
Licensed User
Hi Stefano

I am trying to put a tick in a column with this code but it appears not to work could you check it for me please as I am probably missing something.

private Sub LoadGrid

CLGrid.Initialize("CLGrid")
CLGrid.RowHeight = 15%y
CLGrid.HeaderHeight = 7%y
CLGrid.HeaderTextSize = 16
CLGrid.HeaderTextColor = Colors.White
CLGrid.HeaderTypeface = Typeface.DEFAULT_BOLD
CLGrid.HeaderColor = Colors.Black

Dim cc(3) As xnGridCol
cc(0).Initialize2 ("Test", "TEST", 15%x, Gravity.LEFT):CLGrid.ColAppend ( cc(0))
cc(1).Initialize2 ("Test1", "TEST1", 15%x, Gravity.LEFT):CLGrid.ColAppend ( cc(1))
cc(2).Initialize2 ("Test2", "TEST2", 15%x, Gravity.LEFT):CLGrid.ColAppend ( cc(2))

cc(0).RowIconTop = 2%y
cc(0).RowIconLeft = 2%x
cc(0).setTypeCheck

cc(1).RowIconTop = 2%y
cc(1).RowIconLeft = 2%x
cc(1).setTypeCheck

Activity.AddView (CLGrid, 0%x, 0%y, 45%x, 40%y)

CLGrid.RowAppend( Array As String("","1", ""))
CLGrid.RowAppend( Array As String("1","", "1"))

CLGrid.Visible = True
CLGrid.GridWidth = 1
CLGrid.PixelFix = False

CLGrid.GridCreate2(False)
End Sub

private Sub CLGrid_CellClick ( Col As Int , Row As Int )
Dim result As Int

result = Msgbox2("Please select Yes for a Tick", "", "Yes", "", "No", Null )

If result = DialogResponse.POSITIVE Then
CLGrid.SetValue(Row ,Col , "1")
Else
CLGrid.SetValue(Row ,Col, "0")
End If

End Sub
 

David Cochrane

Member
Licensed User
I have two-dimensional strings array...

SArr(32, 11) As String

and would like to create from that xnGrid with 11 columns and 32 rows.
There is no problem with 11 columns creation but how in a cycle to add all those rows?

For r = 1 To rows
gg.RowAppend(SArr(r)) 'doesn't work
Next
 

Carles Escudé

Member
Licensed User
Hello,

What if I need to change the row color depending on the value of the column 3 (in example)?

Many thanks!

[ EDIT ]

ok! I found the method DG_RowProps. But, as I said, I need the BackgroundColor property.

Do you know when will it arrive?

Thanks again!
 
Last edited:

BluSky76

Member
Licensed User
Hi Stefano,
it is possible, in the future, add a command to move the lines?

example:
gg.RowMove (CurrenteRow, NewRow)

Thanks
 

stefanobusetto

Active Member
Licensed User
@BluSky76

I dont think so
Sorry

I belive the grid must only display data
So you should, in my opinion, exchange the
underlying data and then refresh the grid
:)
 

TheMightySwe

Active Member
Licensed User
Hello, I was wondering if it possible to get a a event on _CellRelease(Row As Int, Col As Int) So you can mark when you release the finger from the screen. Do you think that is possible?

//TMS
 
Top