| protected void btn_NavigateGoogle_Click(object sender, EventArgs e) |
| { |
| InjectScriptLabel.Text = "<script>CloseAndNavigate()</" + "script>"; |
| } |
| <script type="text/javascript"> |
| function CloseAndNavigate() |
| { |
| GetRadWindow().close(); |
| window.location = Http://www.google.com; |
| } |
| </script> < asp:Button ID="btn_NavigateGoogle" runat="server"
Text="Close Me" onclick="btn_NavigateGoogle_Click" />
< asp:Label ID="InjectScriptLabel" runat="server" Visible="true"></asp:Label>
|
Here's my setup. Master page with RadAjaxManager and RadScriptManager both on it. Content page with RadGrid and RadAjaxManagerProxy.
I have setup the RadGrid to use a user control for editing. All works well without setting up the RadAjaxManagerProxy. As soon as I setup the AjaxManagerProxy as follows I get a javascript error.
From what I can tell it is coming from Telerik.Web.UI.WebResource_2.axd. The code highlighted by VS2008 reads: var a=g?new h(g):new h
the variable h is undefined.
If I ignore the error the Rad controls on my user control do not work at all.
Also, I get the exact same behavior if I remove the RadAjaxManagerProxy and instead wrap my grid in a RadAjaxPanel. So it's not entirely specific to the Proxy.
Any help would be appreciated.
[RadAjaxManagerProxy setup]
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="grdQueue"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="grdQueue" |
| /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManagerProxy> |
UPDATE: I downloaded the source and debugged against it. Everything worked ok. Realized a new build of Q2 was out. Upgraded to that and all is well.
|
|
| <telerik:RadGrid ID="rgdStatusList" runat="server" AllowPaging="True" AllowSorting="True" |
| AutoGenerateColumns="False" DataSourceID="odsGetStatusList" GridLines="None" |
| OnNeedDataSource="rgdStatusList_NeedDataSource" ShowGroupPanel="false" |
| OnItemCommand="rgdStatusList_ItemCommand" ShowStatusBar="True" |
| AllowMultiRowSelection="true" PageSize="30" OnItemDataBound="rgdStatusList_ItemDataBound" |
| onprerender="rgdStatusList_PreRender" OnInsertCommand="rgdStatusList_InsertCommand" Width="275px" |
| OnPageIndexChanged="rgdStatusList_PageIndexChanged" OnDeleteCommand="rgdStatusList_DeleteCommand"> |
| <ValidationSettings EnableValidation="true" /> |
| <MasterTableView DataKeyNames="StatusID" DataSourceID="odsGetStatusList" CommandItemDisplay="Top" |
| EditMode="InPlace"> |
| <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="TopAndBottom" /> |
| <CommandItemTemplate> |
| <telerik:RadToolBar ID="rtbToolBar" OnButtonClick="rtbToolBar_ButtonClick" runat="server" |
| OnClientButtonClicking="onToolBarClientButtonClicking"> |
| <Items> |
| <telerik:RadToolBarButton Text="Add Status" SkinID="AddBtn" CommandName="InitInsert" ToolTip="Add Status Code" |
| Visible='<%# !rgdStatusList.MasterTableView.IsItemInserted %>'> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Save Status" SkinID="AddBtn" CommandName="PerformInsert" ToolTip="Save Status" |
| Visible='<%# rgdStatusList.MasterTableView.IsItemInserted %>' ValidationGroup="validate"> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Cancel" SkinID="CancelBtn" CommandName="CancelAll" ToolTip="Cancel" |
| Visible='<%# rgdStatusList.MasterTableView.IsItemInserted %>'> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Delete Status" SkinID="DeleteBtn" CommandName="DeleteSelected" ToolTip="Delete Status Code" |
| Visible='<%# !rgdStatusList.MasterTableView.IsItemInserted %>'> |
| </telerik:RadToolBarButton> |
| <telerik:RadToolBarButton Text="Set Defaults" SkinID="SetDefaultsBtn" CommandName="SetDefaults" ToolTip="Set Defaults"> |
| </telerik:RadToolBarButton> |
| </Items> |
| </telerik:RadToolBar> |
| </CommandItemTemplate> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="StatusID" DataType="System.Int32" |
| HeaderText="Status ID" SortExpression="StatusID" UniqueName="StatusID" ReadOnly="true" |
| Visible="false"> |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn DataField="StatusDescription" HeaderText="Status Name" |
| SortExpression="StatusDescription" UniqueName="StatusDescription" EditFormColumnIndex="1"> |
| <ItemTemplate> |
| <asp:Label ID="lblStatusDesc" runat="server" |
| Text='<%# DataBinder.Eval(Container, "DataItem.StatusDescription")%>'> |
| </asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <telerik:RadTextBox ID="txtStatusDesc" runat="server" Text="" Width="200" MaxLength="26"> |
| </telerik:RadTextBox> |
| <br /> |
| <asp:RequiredFieldValidator ID="rfvStatusDesc" runat="server" ControlToValidate="txtStatusDesc" |
| ErrorMessage="You cannot have a blank Status Description." SetFocusOnError="true" |
| ValidationGroup="validate" Display="Dynamic"> |
| </asp:RequiredFieldValidator> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="Active" DataField="Active" SortExpression="Active" |
| HeaderText="Type" EditFormColumnIndex="1"> |
| <ItemTemplate> |
| <asp:Label ID="lblStatusType" runat="server" Text='<%# TypeStatus(DataBinder.Eval(Container, "DataItem.Active"))%>'> |
| </asp:Label> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:CheckBox ID="chkActive" runat="server" ToolTip="Click to set this Status to an Active Type" /> |
| </EditItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| <EditFormSettings ColumnNumber="2"> |
| </EditFormSettings> |
| </MasterTableView> |
| <ClientSettings> |
| <Selecting AllowRowSelect="true" /> |
| </ClientSettings> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| <StatusBarSettings ReadyText="Ready" /> |
| <ValidationSettings CommandsToValidate="PerformInsert" /> |
| </telerik:RadGrid> |