PRB: MSFlexGrid Does Not Refresh When SQL Property Changes

Last reviewed: January 23, 1998
Article ID: Q179759
The information in this article applies to:
  • Microsoft Visual Studio versions 97, 97sp3

SYMPTOMS

If the customer has an MSFlexGrid on a form that is bound to a RemoteData Control(RDC), and if the recordset of the control is changed (for example, by changing the SQL property of the RDC), the records displayed in the grid are from the original recordset, not the new one. Refreshing or repainting the grid does not help.

CAUSE

When a control like this is bound to a data source, it gets an ICursor to give it access to a cursor with the data. When the recordset changes, an event is fired that tells the bound control that the data has changed. The control then frees up the old cursor and grabs the new one. The MSFlexGrid appears to be ignoring the change event when it fires.

RESOLUTION

The best workaround is to use the DBGrid control included with Visual Studio instead.

If you must have a control that shows the new recordset after the RDC changes, then the only other option is to find a third party control that does this.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: FlexGrid Refresh Update Datasource SQL
Technology : kbole
Version : WINDOWS:97,97sp3
Platform : WINDOWS
Issue type : kbprb


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.

Last reviewed: January 23, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.