all groups > asp.net building controls > june 2005 >
You're in the

asp.net building controls

group:

Using DataViewManager with a WebControls.DataGrid


Using DataViewManager with a WebControls.DataGrid martyn_wynne NO[at]SPAM hotmail.com
6/16/2005 5:39:19 AM
asp.net building controls:
Does anyone know how to bind a dataset to a WebControls.DataGrid using
a DataViewManager. For a Forms DataGrid, it is...

// Bind to a DataGrid.
System.Windows.Forms.DataGrid myGrid =3D new
System.Windows.Forms.DataGrid(=AD);
myGrid.SetDataBinding(myDVM, "Customers");

see

http://msdn.microsoft.com/library/en-us/cpguide/html/cpconsettingdefaulttab=
leviewsusingdataviewmanager.asp
Re: Using DataViewManager with a WebControls.DataGrid Teemu Keiski
6/20/2005 9:36:33 PM
Hello,

Webform DataGrid's binding works via its DataSource ( and optionally
DataMember) property. After setting these, you'd call DataBind for it. So
probably you think it so that you assign return value of
DataViewManager.CreateDataView (a DataView) to the DataSource property of
the DataGrid.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke


AddThis Social Bookmark Button