DOCUMENT:Q190906 07-AUG-1998 [vbwin] TITLE :BUG: DBGrid Displays Blank Rows When Modifying Column Width PRODUCT :Microsoft Visual Basic for Windows PROD/VER: OPER/SYS:WINDOWS KEYWORDS: ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Enterprise Edition for Windows, versions 5.0, 6.0 --------------------------------------------------------------------- SYMPTOMS ======== Setting the width of a column in the properties of a bound DBGrid control at design-time results in the DBGrid displaying blank rows. RESOLUTION ========== When doing an alternate click on the DBGrid, select "Retrieve Fields" first, and then the column width can be modified successfully. STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a new standard EXE project in Visual Basic. Form1 is created by default. 2. Under the Project - Components menu, select the following components: - Microsoft Data Bound Grid Control 5.0 (SP3) - Microsoft RemoteData Control 5.0 (SP2) in Visual Basic 5.0 or - Microsoft RemoteData Control 6.0 in Visual Basic 6.0 3. Add the DBGrid and Remote Data Control to the new Form. 3. Set the DataSourceName property of the Remote Data Control to a DSN that is pointing to a SQL Server Database. Under the SQL property for the MSRDC, type a simple Select statement, such as Select * from Authors(when the SQL Database is Pubs). 4. Set the DBGrid's DataSource property to MSRDC1. 5. Press the F5 key to run the application and the rows should appear in the DBGrid as they are in the SQL database. 6. In Design mode, alternate-click on the DBGrid and choose Properties. From the Layout tab, change the width of Column 0 or 1. 7. Press the F5 key to run the application once again, and note the DBGrid displays a blank row for every record returned by the SQL statement. NOTE: This also occurs when the DBGrid is bound to a standard Data Control connecting to an Access database or an ODBC data source. Additional query words: kbdse kbDSupport kbVBp kbVBp500bug kbVBp600bug kbRDS200bug kbCtrl kbDatabase kbDataBinding kbActiveX ====================================================================== Platform : WINDOWS Issue type : kbbug ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1998.