CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 1999
    Location
    USA
    Posts
    101

    dbgrid, flexgrid,or datagrid?

    Performance wise, which is the best- DBGrid, MSFlexGrid or DataGrid. what is the difference between the three?

    Thanks


  2. #2
    Join Date
    Oct 1999
    Location
    S.W. Wyoming
    Posts
    25

    Re: dbgrid, flexgrid,or datagrid?

    Performance wise, I haven't a clue. Certainly I have never noticed a significant difference (and I have used all three at one time or another). As to other differences, the DataGrid is primarily intended to display records from a Microsoft Access or SQL database, whereas the other grids are more for spreadsheet-like apps.
    The only differences between DBGrid and MSFlexGrid that I have noticed are the version of VB that provides them, and differences between available properties and methods. I can tell you that I have found (for various reasons) the FlexGrid control annoying and still use the DBGrid when I use a non-bound grid. But that may be merely personal preference. One note I CAN provide on performance: if using a DBGrid, with very large tables (say on the order of 100,000 records), you will see a HUGE difference in performance if you open a table recordset rather than a query recordset. I never use snapshots: I don't know what that performance would be.


    Reid Allen Robbins
    2205 E. Teton Blvd.
    Green River, WY 82935

  3. #3
    Guest

    Re: dbgrid, flexgrid,or datagrid?

    hello,
    if i just wan to show some words insides grid, which one is suitable
    and for ur information, words from system , not from database or tables

    thanks in advance


  4. #4
    Join Date
    Oct 1999
    Location
    S.W. Wyoming
    Posts
    25

    Re: dbgrid, flexgrid,or datagrid?

    If your intention is simply to show words and not bind the grid to a database, there is really no question: you need to use either the plain 'ole Grid control or the Flexgrid control. I personally prefer the plain control as I've gotten frustrated with various aspects of the Flexgrid control. Despite an error in my reply to the original letter, where I didn't notice I'd said I use the DBGrid control in non-bound applications (I meant the "Grid" control--no qualifier), there is no way I've found (though some more clever person might know a means) to add columns to a DBGrid beyond the original 2 columns it sets up automatically. This grid control must be bound to a database at design time and the "Retrieve Fields" function performed to create more than the 2 default columns. By contrast, the number of rows and columns in an normal grid control can be set either at design time or programmatically. In fact, the sort of non-bound use you describe is exactly the raison d'etre of the grid control.

    I hope this answers your question satisfactorilly.

    Reid


    Reid Allen Robbins
    Green River, WY 82935

  5. #5
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: dbgrid, flexgrid,or datagrid?


    Lothar from this forum has an excellent example of using the DBGrid in 'un-bound' mode using disconnected ADO recordsets - take a look at :

    http://codeguru.developer.com/vb/articles/1966.shtml



    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured