PRB: Visual InterDev 6.0 Grid DTC User Interface Is Not Visible After a Roundtrip to the Server (232324)
The information in this article applies to:
- Microsoft Visual InterDev 6.0
This article was previously published under Q232324 SYMPTOMS
In certain scenarios, you may find that your Grid Design-Time Control (DTC) user interface (UI) is not visually rendered when you click the Recordset Navigation button or the Page Navigation button. This happens most frequently when you call parameterized queries or stored procedures and use the Grid DTC to display the results. The Grid DTC user interface may not be displayed after a roundtrip to the server.
CAUSE
This behavior is due to a state preservation problem of the Grid DTC Script object. The _DG_Display() function in the DataGrid.asp page from the _ScriptLibrary folder is used to display the user interface of the Grid DTC on the page. After the Active Server Pages (ASP) page makes a roundtrip to the server, the Recordset DTC, which the Grid DTC is bound to, may be lost. In these cases, the objRS._isEmpty() function returns true when it is called by the _DG_Display() function. As a result, the grid is not displayed on the page.
RESOLUTION
To work around this problem, add the following code to manually reopen the Recordset DTC in the Button1_onClick() event handler:
Sub Button1_onclick()
If Recordset1.isOpen() then
Recordset1.close
end if
Recordset1.setParameter 0,Textbox1.value
Recordset1.open
End Sub
NOTE: If you are passing a value automatically to the Recordset DTC, for example when you specify Textbox1.value in the Value field of the Parameters tab of the Recordset DTC, you must remove that entry from the Value field. You do not want to use a DTC value as the default parameter in a Recordset DTC. When the next page arrow is clicked, the page is redrawn, and that value is temporarily lost. Therefore, an empty parameter is sent to the Recordset DTC.
Modification Type: | Major | Last Reviewed: | 4/22/2001 |
---|
Keywords: | kbCtrl kbprb KB232324 |
---|
|