Results 1 to 7 of 7

Thread: Use Datagrid or MSHFlexGrid ?

  1. #1

    Thread Starter
    Lively Member Tgirgenti's Avatar
    Join Date
    Sep 2010
    Posts
    82

    Use Datagrid or MSHFlexGrid ?

    Hello,

    I'm developing in VB6, SP6 on XP Pro, SP3 computer.

    I want to allow users to view/modify/update a table using some kind of grid.

    Should I use the Datagrid or MSHFlexGrid?

    I see there are a lot of posts in these forums about using one as opposed to the other. I'm not sure of which one to use. I have already used the MSHFlexGrid to just display a table, so I know how to do that.

    It seems that you get more control of formatting the headers and rows using the MSHFlexGrid, but is it easy to code Add/Change/Delete of records?

    Any help would be gratefully appreciated.

    Thanks,
    Tony

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Use Datagrid or MSHFlexGrid ?

    The DataGrid is designed as a control for data entry and editing. The FlexGrids are not.

    DataGrids work best when using data binding (indeed the docs say it must be bound, but this isn't quite true).

    People use various hacks to "float" a marquee TextBox over selected cells in FlexGrids to accomplish entry/editing. This works, but you don't get the insert/delete row functionality or the "split view" functionality a DataGrid offers.

    The choice really depends on what you want to do and how much code you want to write in order to get a highly customized result.

  3. #3
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Use Datagrid or MSHFlexGrid ?

    Flexgrid is far more advanced grid control than any other grid MS offered prior to .net release.
    Granted it requires more coding but in exchange you will get much more robust gui. Datagrid on the other hand is just limited so much you will dump it short while after.
    Follow one of links in my signature for many [flexgrid related] tips and sample code.

  4. #4

    Thread Starter
    Lively Member Tgirgenti's Avatar
    Join Date
    Sep 2010
    Posts
    82

    Re: Use Datagrid or MSHFlexGrid ?

    Thanks to dilettante and RhinoBull for their replies.

    I want to use the MSHFlexGrid because i have already used it to display a simple table and it seems easier to control the appearance of the headers and rows.

    However, i clicked on the RhinoBull "How to use MS FlexGrid" link and see that the post there talks about controlling the appearance and cycling through the flex grid, but i don't see anything on how to use it to Add/Change/Delete records.

    Is there a way to do that and do you have a link for that?

    Thanks,
    Tony

  5. #5

  6. #6

    Thread Starter
    Lively Member Tgirgenti's Avatar
    Join Date
    Sep 2010
    Posts
    82

    Re: Use Datagrid or MSHFlexGrid ?

    Wow! That's quite a post full of information.

    Thanks Rhino.

  7. #7

Tags for this Thread

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