-
Mar 12th, 2011, 12:07 PM
#1
Thread Starter
Lively Member
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
-
Mar 12th, 2011, 12:32 PM
#2
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.
-
Mar 12th, 2011, 12:44 PM
#3
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.
-
Mar 12th, 2011, 01:36 PM
#4
Thread Starter
Lively Member
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
-
Mar 12th, 2011, 06:20 PM
#5
Re: Use Datagrid or MSHFlexGrid ?
Sure it can be done but you'll have to code it yourself.
You will need few buttons (one for each action) and you can start learning database programming with VB6 DB FAQ.
-
Mar 13th, 2011, 08:28 AM
#6
Thread Starter
Lively Member
Re: Use Datagrid or MSHFlexGrid ?
Wow! That's quite a post full of information.
Thanks Rhino.
-
Mar 13th, 2011, 09:02 AM
#7
Re: Use Datagrid or MSHFlexGrid ?
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|