Hello,
We have a FormView embedded inside two user controls that we put on several of our pages, one for inserting records and one for updating them. The formviews are not visible initially, and the user clicks a button to make them visible. Inside each formview is a button that opens a RadWindow. One of the formviews is embedded inside the SelectedItemTemplate of a DataList.
The pages also use AJAX. When I turn off the ajax, everything works fine. However, with the ajax disabled, the radwindow opens fine from the user control embedded inside the datalist, but not the one that's initially invisible at startup outside the datalist. However, when I try to open it with the other formview (the one not initially visible), two JavaScript errors get thrown.
The errors are:
this._windows.length is null or not an object
Object doesn't support this property or method
Here's some sample code from the aspx page:
<uc:SignUps_Insert_frmvu id="SignUps_Insert_frmvu" runat="server">
<asp:DataList id="Cls_SignUps_datlst" runat="server" ... >
<ItemTemplate>
....
</ItemTemplate>
<SelectedItemTemplate>
<uc:SignUps_Details_frmvu id="SignUps_Details_frmvu" runat="server" ... />
</SelectedItemTemplate>
</asp:DataList>
(The RadWindow opening is handled from JavaScript).
On the insert formview user control:
<asp:FormView id="SignUps_Insert_frmvu" runat="server" Visible="false" ... >
<InsertItemTemplate>
...
<asp:HiddenField ID="ClsID_hdn" runat="server" ... />
<uc:Btn id="Select_Event_btn" runat="server" ... /><br />
...
</InsertItemTemplate>
</asp:FormView>
In the code-behind of the insert formview user control (VB.NET):
Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
...
If (Page.FindControl("Select_Event_radwdw_mgr") Is Nothing) Then
Dim Select_Event_radwdw_mgr As RadWindowManager = New RadWindowManager()
With Select_Event_radwdw_mgr
.ID = "Select_Event_radwdw_mgr"
.VisibleOnPageLoad = False
.Width = 450
.Height = 410
End With
MyBase.Controls.Add(Select_Event_radwdw_mgr)
End If
...
End Sub
On the details formview user control:
<asp:FormView id="SignUps_Insert_frmvu" runat="server" Visible="false" ... >
<ItemTemplate>
...
</ItemTemplate>
<EditItemTemplate>
...
<asp:HiddenField ID="ClsID_hdn" runat="server" ... />
<uc:Btn id="Select_Event_btn" runat="server" ... /><br />
...
</EditItemTemplate>
</asp:FormView>
If anybody can help me it would be appreciated. By the way, I'm new to this forum and this is my first-ever post, so if it's sloppy or confusing please forgive me.
Thanks,
Jason
We have a FormView embedded inside two user controls that we put on several of our pages, one for inserting records and one for updating them. The formviews are not visible initially, and the user clicks a button to make them visible. Inside each formview is a button that opens a RadWindow. One of the formviews is embedded inside the SelectedItemTemplate of a DataList.
The pages also use AJAX. When I turn off the ajax, everything works fine. However, with the ajax disabled, the radwindow opens fine from the user control embedded inside the datalist, but not the one that's initially invisible at startup outside the datalist. However, when I try to open it with the other formview (the one not initially visible), two JavaScript errors get thrown.
The errors are:
this._windows.length is null or not an object
Object doesn't support this property or method
Here's some sample code from the aspx page:
<uc:SignUps_Insert_frmvu id="SignUps_Insert_frmvu" runat="server">
<asp:DataList id="Cls_SignUps_datlst" runat="server" ... >
<ItemTemplate>
....
</ItemTemplate>
<SelectedItemTemplate>
<uc:SignUps_Details_frmvu id="SignUps_Details_frmvu" runat="server" ... />
</SelectedItemTemplate>
</asp:DataList>
(The RadWindow opening is handled from JavaScript).
On the insert formview user control:
<asp:FormView id="SignUps_Insert_frmvu" runat="server" Visible="false" ... >
<InsertItemTemplate>
...
<asp:HiddenField ID="ClsID_hdn" runat="server" ... />
<uc:Btn id="Select_Event_btn" runat="server" ... /><br />
...
</InsertItemTemplate>
</asp:FormView>
In the code-behind of the insert formview user control (VB.NET):
Protected Overrides Sub OnPreRender(ByVal e As EventArgs)
...
If (Page.FindControl("Select_Event_radwdw_mgr") Is Nothing) Then
Dim Select_Event_radwdw_mgr As RadWindowManager = New RadWindowManager()
With Select_Event_radwdw_mgr
.ID = "Select_Event_radwdw_mgr"
.VisibleOnPageLoad = False
.Width = 450
.Height = 410
End With
MyBase.Controls.Add(Select_Event_radwdw_mgr)
End If
...
End Sub
On the details formview user control:
<asp:FormView id="SignUps_Insert_frmvu" runat="server" Visible="false" ... >
<ItemTemplate>
...
</ItemTemplate>
<EditItemTemplate>
...
<asp:HiddenField ID="ClsID_hdn" runat="server" ... />
<uc:Btn id="Select_Event_btn" runat="server" ... /><br />
...
</EditItemTemplate>
</asp:FormView>
If anybody can help me it would be appreciated. By the way, I'm new to this forum and this is my first-ever post, so if it's sloppy or confusing please forgive me.
Thanks,
Jason