Listview.dll with and without SQLite-Interface

Discussion in 'Additional Libraries' started by Filippo, Feb 12, 2008.

  1. Filippo

    Filippo Expert Licensed User

    Listview.dll with and without SQLite and SQLce-Interface

    Hallo,

    ListView is an alternative to the Table control providing some additional features like:
    • Alternate colors of every second row
    • Text alignment within cells
    • CheckBoxes in front of every row
    • Full row select
    • Gridlines
    • Sorting upon click on header
    • Full coloring options
    • SQLite interface
    • SQLce interface
    • Elegant design

    • Listview is there in two versions, with and without SQLite and SQLce-Interface.
    • All SQL-functions and SQL-methods are included only in the Listview with and SQLite and SQLce-Interface.

    03.08.2008 v1.0.7.0:
    Listview with SQLce-Interface, please read Helpfile for more informations.
    Helpfile and Expamples are in the Zip-File.
    I've added more functions which I don't want to describe here.
    So please take a look at the examples and the helpfile.


    07.08.2008 v1.0.7.1:
    1) MoveSelectedRow (New function)
    This feature moves all selected listview items either
    to line up or down.
    2) SelectRow
    Error select resolved
    3) DuplicateSelectedRow (New function)
    Duplicate all selected Row


    03.02.2009 v1.0.7.2:
    I've added a lot of new features and properties, for example:
    1) GridLines (the same view as Table Control)
    2) LoadSQL (with Password and CommandString) Password only by ListviewSQLce
    3) Tag-Property (Gets or sets an String that contains data to associate with the item)
    4) ...
    So please take a look at the examples and the helpfile.


    06.03.2009 v1.0.7.4:
    I've added a lot of new features and properties only bei ListviewSQLce:
    1) Compact
    2) IsPasswordOK
    3) IsPasswordRequired
    Example: http://www.basic4ppc.com/forum/share-your-creations/3972-sqlce-manager.html#post22998


    13.04.2009 v1.0.7.5:
    Error in module LoadCSV fixed. Now you can add multi-line text.


    20.06.2009 v1.0.7.6:
    1. Error in module LoadCSV fixed, same function as Table-Control.
    2. ListviewSQLDesktop.dll and ListviewSQLDevice.dll is now compatible with Basic4ppc V6.8


    28.10.2010 v1.0.7.7:
    1. ListviewSQLDesktop.dll and ListviewSQLDevice.dll is now compatible with Basic4ppc V6.9


    24.11.2010 v1.0.7.8:
    1. Event ItemCheck added


    15.05.2011 v1.0.7.9:
    2 Features added: SetItemTextColor and GetItemTextColor



    18.05.2011 v1.0.8.0:
    Features added: ContextMenuItemEnabled and ContextMenuItemEnabled2 ( get / set ContextMenuItemEnabled)


    Ciao,
    Filippo
     

    Attached Files:

    Last edited: May 18, 2011
  2. giannimaione

    giannimaione Well-Known Member Licensed User

    ottima scelta Filippo,

    ciao,
     
  3. Filippo

    Filippo Expert Licensed User

    Hallo,

    Listview with SQLite and SQLce-Interface.

    I've added more functions which I don't want to describe here.
    So please take a look at the examples and the helpfile.


    Ciao,
    Filippo
     
  4. manu

    manu Active Member Licensed User

    Filippo thanks.

    missing file system.data.sqlserverce.


    manu
     
  5. manu

    manu Active Member Licensed User

    Hello Filippo.

    I can use the TabControl with sqlliview?

    I have tried but gives me wrong.

    manu
     
  6. Filippo

    Filippo Expert Licensed User

    Hallo manu,

    you must "SQLserverCompact 3.5" install.
    It is all in the help file describe.

    Ciao,
    Filippo
     
  7. manu

    manu Active Member Licensed User

    thank you filippo.

    I can use the TabControl with sqlliview?



    Manu
     
  8. Filippo

    Filippo Expert Licensed User

    you must listview into a Panel-Control and then Panel-Control in the TabControl.
     
  9. manu

    manu Active Member Licensed User

    OK Filippo

    Great solution.

    Now I just need to know whether. Loadsql accepts orders sql


    Thanks for your help
     
  10. Filippo

    Filippo Expert Licensed User

    Hello,

    i have updated my library v1.0.7.1


    Ciao,
    Filippo
     
  11. manu

    manu Active Member Licensed User

    Thanks Filippo.

    Is that news is this library?

    manu
     
  12. Cableguy

    Cableguy Expert Licensed User

    ControlRef missing and no CS file

    Hi Fillipo...

    I'm trying to use your dll with formExDesktop, and I !!!NEED!!! the ControlRef, wich does not exist in the current version of your dll...
    Since you have not provided a CS file, I cannot add this prop it myself..
    Could You please do this...???
     
  13. agraham

    agraham Expert Licensed User

    You could try getting it with the Door library
    Code:
    Obj.New1(False)
      ... 
    Obj1.FromLibrary(
    "ListViewObjectName""_LV", B4pObject(2))
     
  14. Erel

    Erel Administrator Staff Member Licensed User

    Don't forget the module name:
    Code:
    Obj1.FromLibrary("Main.ListViewObjectName""_LV", B4pObject(2))
     
  15. Filippo

    Filippo Expert Licensed User

    Hi Cableguy,

    i don't understand for what you need a CS-file, the ControlRef or why...:confused:


    Ciao,
    Filippo
     
  16. Cableguy

    Cableguy Expert Licensed User

    I'm using your ListView with SQLLibrary (NOT ListViewSQL), And I need to reference the Listview in a command as a String...
    Since there is no NAME prop or Control.Ref, The command can't "see" the desteny table...

    With the cs file I could Add this prop to the dll myself and then use it...

    @EREL & Agraham:
    I'm using 4 dll's already, and adding another one just to get this parameter is a bit overkill...
    Anyway...
    Code:
    Obj1.FromLibrary("Main.ListViewObjectName""_LV", B4pObject(2))
    I can use this line like this?
    Code:
    LIstView_CtrlRef=Obj1.FromLibrary("Main.ListViewObjectName""_LV", B4pObject(2))
     
    Last edited: Nov 14, 2008
  17. Filippo

    Filippo Expert Licensed User

    could you please post a part of your code here? maybe i find another way to get your problem away
     
  18. Cableguy

    Cableguy Expert Licensed User

    I have a module handling the database, so I just pass some values to a particular sub...
    Like this one:

    Code:
    Public Sub Load_Tecnicos(destino)
    Cmd.CommandText = 
    "SELECT Nome FROM Tecnico"
    cmd.ExecuteTable(Destino,
    0)
    cmd.ExecuteNonQuery
    End Sub
    In this sub I pass as "destino" the table name...
    But since I'm using your listview.dll, I cant get a valid reference to the table without the ControlRef.

    With a native b4ppc table, my command would look like this...

    BaseDados.Load_Tecnicos("Main.Table")

    With ListView, it must be something like...

    BaseDados.Load_Tecnicos(ListView.controlRef)
     
  19. Filippo

    Filippo Expert Licensed User

    Here is a small example

    PHP:
    Sub Globals
      Database
    =AppPath "\Northwind.sl3"
      
    SortAscending=True
    End Sub

    Sub App_Start
      Form1
    .Show
      lv
    .New1("Form1",0,0,Form1.Width Form1.Height)
      
    lv.FullRowSelect=True
      lv
    .SetRowColor(cBeige,cSilver)
      
    LoadSQL
    End Sub

    Sub LoadSQL
      lv
    .Clear
      
    ' ' lv.loadSQL(Database,"Categories"""True)
      
    lv.loadSQL(Database,"Products"""True)
    End Sub

    Sub lv_ColumnClick
      SortAscending
    =Not(SortAscending)
      
    lv.SortColumn(lv.SelectedColumn,SortAscending)
    End Sub
     
  20. Cableguy

    Cableguy Expert Licensed User

    I tryied EREL's and Agraham's code, but it fails with the error message below...

    @Filippo
    The call to the LoadTecnicos sub is comming from a diferent module...
    The database module will hold ONLY and EXCLUSEVELY SQL objects(command, Conectio and datareader).
    Your aproach demand me to add the treeview object to the database, and is is a NO-NO for me...
    With a native table, all goes OK
     
Loading...