Microsoft KB Archive/190674

= PRB: Grid DTC's Underlying Recordset Changes Are Lost =

Article ID: 190674

Article Last Modified on 3/7/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q190674



SYMPTOMS
Any changes made to the current record of the Grid Design-Time Control's (DTC's) underlying recordset are lost when one of the Grid DTC's navigation buttons is clicked. Thus, if you make changes to the values in DTC's bound to the same Recordset as the Grid and click a navigation button, the underlying Recordset is not updated.



CAUSE
The updateOnMove properties of the two intrinsic Recordset Navbars of the Grid DTC are set to false by default.



RESOLUTION
The Grid DTC exposes the getPagingNavBar and getRecordsetNavbar methods to allow you to script against its intrinsic Recordset Navbars. You can use these two methods to turn on the updateOnMove property of the Recordset Navbars.

The following sample "thisPage_onenter" event handler successfully turns on updateOnMove for the intrinsic Recordset Navbars of a Grid DTC in an Active Server Pages (ASP) page:  function thisPage_onenter {

Grid1.getPagingNavbar.updateOnMove = true; Grid1.getRecordsetNavbar.updateOnMove = true;

}  



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new Visual InterDev Project. Add an Active Server Pages page. Drag the following Design-Time Controls, and drop them onto the source view of the page in the following order:

Recordset TextBox Recordset Navbar DataGrid

 Create a data connection, and bind it to the Recordset. Bind the Navbar control, DataGrid control, and a text box to the Recordset. Select a file to display in the text box.</li> Right-click the Grid DTC, and then click Properties. On the Navigation tab, select the Enable Row Navigation check box.</li> View the page in your browser.</li> Make the changes to the value in the text box, and click the navigation buttons of the Grid to navigate to the next page.</li> Click the navigation button again to return to the previous page. Notice that the data in the text box has not changed.</li></ol>

Keywords: kbdatabase kbprb kbctrl KB190674

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.