You cannot obtain data by using the DataGrid component when you bind a DataGrid control to a DataSet object that is returned from a Web service (317427)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q317427 SYMPTOMS
The DataGrid control may not contain data under the following circumstances:
- You bind a DataGrid control to an ADO.NET DataSet object by using the Form designer, and the designer creates an instance of a DataSet on the form.
-and-
- You set that instance variable to a DataSet that a Web method returns through a Web service in the Load event handler.
CAUSE
This problem occurs because the DataGrid control is still bound to the old instance of the DataSet on the form, not the new instance that the Web service returns.
RESOLUTION
To work around this problem, use one of the following methods:
STATUSThis behavior is by design.
| Modification Type: | Minor | Last Reviewed: | 3/10/2006 |
|---|
| Keywords: | kbDataAdapter kbprb kbSqlClient kbSystemData KB317427 |
|---|
|