views:

2600

answers:

0

Hi there -

I'm using a RADGrid inside a WebUserControl and am having some issues with the Validator Callout Extender.

The Grid uses edit in place and I have setup an EditItemTemplate for one of the fields that contains a drop down list which in turn has a required field validator attached to it.

The validator works as expected, however when I add a Validator Callout Extender I get a Javascript error:

Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: id

When I remove the RadAjaxManagerProxy from the User Control the Validator Callout Extender works as expected.

Anyone any ideas where I'm going wrong with this, is there a property that I need to set for the RadAjaxManagerProxy or some other control?

Please see the ASPX below for an example of a page containing a RADGrid and ValidatorCalloutExtender that fails to display when the RadAjaxManager is included in the page.

Thanks, Simon

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SGTest.aspx.cs" Inherits="MyTest.SGTest" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <asp:ObjectDataSource runat="server" ID="odsData" TypeName="MyNamespace.MyClass" SelectMethod="GetData"  />

    <telerik:RadScriptManager runat="server" ID="rsm1"></telerik:RadScriptManager>

    <telerik:RadAjaxManager runat="server" ID="ram1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdItems" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadGrid runat="server" ID="grdItems" EnableEmbeddedSkins="false" AutoGenerateColumns="false" DataSourceID="odsData"  >
    <MasterTableView CommandItemDisplay="Top" EditMode="InPlace" AllowPaging="true" PageSize="10" DataKeyNames="UniqueID">
        <Columns>
            <telerik:GridTemplateColumn HeaderText="List 1">
                <ItemTemplate>
                    Some thing
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox runat="server" ID="ddlList1" Width="80px" EnableEmbeddedSkins="false" Skin="GraySkin" AllowCustomText="true" MaxLength="50" CausesValidation="false">
                        <Items>
                            <telerik:RadComboBoxItem Value="" Text="" Selected="True" />
                            <telerik:RadComboBoxItem Value="a" Text="a" Selected="False" />
                            <telerik:RadComboBoxItem Value="s" Text="s" Selected="False" />
                        </Items>
                    </telerik:RadComboBox>
                    <asp:RequiredFieldValidator runat="server" ID="reqList1" ControlToValidate="ddlList1"
                        Display="Dynamic" ErrorMessage="You must select something from this list"  />
                    <ajax:ValidatorCalloutExtender runat="server" ID="cveList1" TargetControlID="reqList1" />

                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridEditCommandColumn UniqueName="colMod" ButtonType="LinkButton" EditText="Modify" CancelText="Cancel" />
        </Columns>
        <CommandItemTemplate>
            <table width="100%">
                <tr>
                    <td align="left">
                        A Title
                    </td>
                    <td align="right">
                        <asp:ImageButton ID="ExportToWordButton" runat="server" ImageUrl="~/images/Word.gif"
                            ToolTip="Export to Microsoft Word" />
                        <asp:ImageButton ID="ExportToExcelButton" runat="server" ImageUrl="~/images/Excel.gif"
                            ToolTip="Export to Microsoft Excel"  />
                    </td>
                </tr>
            </table>
        </CommandItemTemplate>
    </MasterTableView>
</telerik:RadGrid>


    </div>
    </form>
</body>
</html>