|
-
Mar 31st, 2007, 12:41 AM
#1
Thread Starter
Lively Member
data grid and msflexgrid
what difference between data grid and msflexgrid?
-
Mar 31st, 2007, 12:50 AM
#2
Re: data grid and msflexgrid
AFAIK, data grids are bound controls while msflexgrids are unbound controls. Correct me if i'm wrong guys.
-
Mar 31st, 2007, 12:50 AM
#3
Lively Member
Re: data grid and msflexgrid
The basic difference is DataGrid is a "Bound" control only (*with an exception
outlined below) and MSFlexGrid can be used unbounded or kind-a-bounded. Basically
this means you can't use DataGrid without a DataControl and FlexGrid can,
but FlexGrid doesn't automatically maintain a connection with the underlying
database and DataGrid does. So Editing a FlexGrid doesn't automatically update
the database.
So with FlexGrid you have to handle updates yourself, which is easy enough
to do. Most applications often need to 'filter' or 'validate' the data first
anyway, so this isn't really a problem.
Also FlexGrid can show hierarchical data and in general is more flexible
with its display options.
The exception to DataGrid's "bound-only" mode is that you can create your
own data-aware or DataBounding classes and bind to those instead of using
an early-bound datacontrol.
-
Mar 31st, 2007, 12:52 AM
#4
Re: data grid and msflexgrid
I guess i was right.
-
Mar 31st, 2007, 12:59 AM
#5
Junior Member
Re: data grid and msflexgrid
Difference between data grid and msflexgrid :
-------------------------------------------
The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.Adaptation to existing Visual Basic code for the data-bound grid (DBGrid).
dbgrid is A spreadsheet-like bound control that displays a series of rows and columns representing records and fields from a Recordset object.
The data grids are bound controls; that is, they require a data source that actually connects to a database and retrieves their data. And it seems that the root of the problem with DBGrid is that there's no data source that can be readily included along with the DBGrid control.
In Visual Basic, the solution is simply to include the Data Control on the same form as DBGrid. But the Data Control is an intrinsic control; it's unavailable to anything outside of the Visual Basic environment itself. and VB 6.0 has a new set of data controls (DataGrid, DataList, DataCombo, MSHFlexGrid, MSFlexGrid) that once again are bound controls. Unlike DBGrid, though, they support OLE DB, and therefore rely on the an ADO Data Source (and in particular the ActiveX Data Objects Data Control, or ADO DC) for data access. Unlike the Data Control, the ADO
DC is a custom control (that is, an .OCX) that can be added to any project. In short, if you add ADO DC to your project along with the
DataGrid control.
Jicks
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
|