setdatabinding

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

VB 2003 allowed datagrid1.datasource = catds.tables("calls") and also
datagrid1.setdatabinding(catds, "calls")

What was the difference? I not sure I ever knew.

Now in VB2005 there is no datagrid but instead a datagridview. It only
offers DataGridView1.DataSource = catds.tables("calls")

I'm getting confused. Why isn't setdatabinding available?
 
cj,

In 2005 is as well the DataGrid available, it seems that they though that if
you have a plane you don't need a cargoship. A DataGridView is a complete
different control then a DataGrid. You can find the DataGrid when you right
click on your toolbox and then select it.

The DataGridView uses a bindingsource. The DataTable works only with
DataTables and DataSets. A DataGridView can only work with all kind of
single collections (like the DataTable and now too by instance with the new
DBML DataBase with Linq tables). However the DataGridView can not be
databinded to a DataSet like the DataGrid.

Cor
 
Correction
The DataTable works only with DataTables and DataSets.

I assume that most understood that I was meaning the DataGrid
works...............

However for those who did not.

Cor
 
Hi Cj,
VB 2003 allowed datagrid1.datasource = catds.tables("calls") and also
datagrid1.setdatabinding(catds, "calls") What was the difference?

The DataGrid.SetDataBinding method sets the DataSource and DataMember
properties at run time. You can consider this method as a helper method to
set the DataSource and DataMember properties at run time. Note that you
must use the SetDataBinding method at run time to reset the DataSource
property.
Now in VB2005 there is no datagrid but instead a datagridview. It only
offers DataGridView1.DataSource = catds.tables("calls") Why isn't
setdatabinding available?

Maybe our product team didn't think the SetDataBinding method is necessary
to the DataGridView, so the DataGridView doesn't have a SetDataBinding
method.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thanks
Hi Cj,

datagrid1.setdatabinding(catds, "calls") What was the difference?

The DataGrid.SetDataBinding method sets the DataSource and DataMember
properties at run time. You can consider this method as a helper method to
set the DataSource and DataMember properties at run time. Note that you
must use the SetDataBinding method at run time to reset the DataSource
property.

offers DataGridView1.DataSource = catds.tables("calls") Why isn't
setdatabinding available?

Maybe our product team didn't think the SetDataBinding method is necessary
to the DataGridView, so the DataGridView doesn't have a SetDataBinding
method.

Hope this helps.
If you have any question, please feel free to let me know.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top