B4A Library Grid/Table and ListView Library

Discussion in 'Additional libraries, classes and official updates' started by stefanobusetto, Mar 28, 2012.

  1. magi6162

    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!!!
     
  2. stefanobusetto

    stefanobusetto Active Member Licensed User

    I have no needs and no requests at the present time.
    May be a layout refresh.
    :)
     
  3. magi6162

    magi6162 Well-Known Member Licensed User

    For example Footers and Freeze columns?;)
     
  4. stefanobusetto

    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
    :)
     
  5. David Hawkins

    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
     
  6. stefanobusetto

    stefanobusetto Active Member Licensed User

    Try to have a look at post #371
    You have also the selected row / col
    :)
     
  7. David Hawkins

    David Hawkins Member Licensed User

    Hi Stefano

    All sorted now thank you

    Regards

    David
     
  8. David Hawkins

    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
     
  9. DonManfred

    DonManfred Expert Licensed User

    yes. Using code tags
     
  10. David Cochrane

    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
     
  11. David Hawkins

    David Hawkins Member Licensed User

    It must be nice to be perfect
     
  12. Carles Escudé

    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: Dec 29, 2015
  13. BluSky76

    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
     
  14. stefanobusetto

    stefanobusetto Active Member Licensed User

    Sorry
    i've not seen the posts since december
     
  15. stefanobusetto

    stefanobusetto Active Member Licensed User

    @David Cochrane

    RowAppend requires an array() with one value for each
    column of the grid
    :)
     
  16. stefanobusetto

    stefanobusetto Active Member Licensed User

  17. stefanobusetto

    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
    :)
     
  18. TheMightySwe

    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
     
  19. stefanobusetto

    stefanobusetto Active Member Licensed User

    i'll have a look

    :)
     
    TheMightySwe likes this.
  20. BluSky76

    BluSky76 Member Licensed User

    Hi Stefano,

    you can delete only the selected rows from the grid?

    Thanks
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice