This is a migrated thread and some comments may be shown as answers.

Migration issue "External component has thrown an exception"

1 Answer 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Golden Gains
Top achievements
Rank 1
Golden Gains asked on 01 Apr 2008, 10:57 PM
Hi,
I've just moved old Rad components to 'new' Prometheus, mostly just Grid and Ajax. I have trouble even compiling it (the weird 'external component has thrown an exception'). This is an old and working project for some time.
It's a complex scenario sort of, see below in the code - I'm wrapping the grid/Telerik into my own user-control, which exposes it as a 'sub-control' - that worked before w/o problems, now that seems to be the culprit for all the problems.
Here is the code if it helps...

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register tagprefix="ctl" namespace="NetSurround.Controls" %>
<%@ Register tagprefix="ctl" tagname="ClientAjaxGrid" src="~/UserControls/Auto Generated/ClientAjaxGrid.ascx" %>

                    <ctl:ClientAjaxGrid id="_clients" runat="server" >
                    <Grid
                    ShowHeader="true"
                    ShowFooter="false"
                    AllowSorting="True"
                    AutoGenerateColumns="false"
                    GridLines="Both"
                    AllowPaging="false"
                    Skin="none"
                    >
                        <SelectedItemStyle CssClass="tableRowClick" />
                        <HeaderStyle CssClass="tamnije" />
                        <MasterTableView AutoGenerateColumns="false"
                            CellPadding="0"
                            CellSpacing="0"
                            GridLines="Both"
                            PageSize="10"
                            Width="710px"
                            CssClass="tdefault sortable scrolltable"
                            >
                            <Columns>
                                <telerik:GridTemplateColumn Visible="true" HeaderText="" UniqueName="Photo" HeaderStyle-Width="100px">
                                    <ItemTemplate>
                                        <a href="<%# ImageUtils.I.GetImg(Container.DataItem as IClientTable).UrlBig%>" rel="lightbox" onclick="<%# WebApp.I.ImageOnClick%>" >
                                        <asp:Image ID="_birdImage" runat="server" Width="100%" ImageUrl='<%# ImageUtils.I.GetImg(Container.DataItem as IClientTable).UrlThumb %>'
                                            AlternateText="No preview available" />
                                        </a>
                                    </ItemTemplate>
                                    <%--<ItemStyle CssClass="tnopadding" />--%>
                                </telerik:GridTemplateColumn>
                                <telerik:GridBoundColumn Visible="false" DataField="ClientID" HeaderText="ClientID" SortExpression="ClientID"
                                    UniqueName="ClientID" HeaderStyle-Width="135px" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Email" HeaderText="Email" SortExpression="Email"
                                    UniqueName="Email" HeaderStyle-Width="233px" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridTemplateColumn HeaderText="Subscription" UniqueName="Subscription" HeaderStyle-Width="233px" HeaderStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <a href="mailto:<%# (Container.DataItem as IClientTable).Email %>" >
                                        <%# (Container.DataItem as IClientTable).Email %>
                                        </a>
                                        <br />
                                        <%# SubscriptionBlock(Container.DataItem as IClientTable)%>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                
                                <telerik:GridBoundColumn DataField="ESTDate" HeaderText="Date" SortExpression="DateCreated"
                                    UniqueName="ESTDate" HeaderStyle-Width="115px" HeaderStyle-HorizontalAlign="Center">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings ApplyStylesOnClient="true" >
                            <Selecting AllowRowSelect="true" EnableDragToSelectRows="true" />
                            <ClientEvents OnRowMouseOver="PairRowMouseOver" OnRowMouseOut="PairRowMouseOut" OnGridCreated="GetPairGrid" OnRowSelected="PairRowSelected" OnRowDeselected="PairRowDeSelected"/>
                        </ClientSettings>
                        <PagerStyle Mode="NextPrevAndNumeric" NextPageText="Next" PrevPageText="Prev" />
                    </Grid>
                    </ctl:ClientAjaxGrid>

                    <br class="clear-l" />

<telerik:RadAjaxmanager ID="_ajaxManager" runat="server">
<AjaxSettings>
</AjaxSettings>
</telerik:RadAjaxmanager>

<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0" CssClass="panelload">
    <div class="centering">
        <ctl:MyImage CssClass="imgload" ID="MyImage3" BorderWidth="0px" runat="server" AlternateText="Loading..." ImageUrl="~/RadControls/AJAX/Skins/Default/loading.gif" />
    </div>
</telerik:RadAjaxLoadingPanel>

<telerik:RadAjaxLoadingPanel ID="_loadingPanelBack" runat="server" Transparency="30" BackColor="#E0E0E0" />


Thanks,
Dragan

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Apr 2008, 08:15 AM
Hi Dragan,

I reviewed your grid and ajax manager definitions and they seem correctly defined. Can you please check whether removing the leading underscore from your user control's id (wrapping the grid instance) along with this from the RadAjaxManager's id) makes a difference? Further, please double-check that you have followed the migration steps listed in these topics from the online documentation to ensure that your code will be compiled and executed successfully:

http://www.telerik.com/help/radcontrols/prometheus/?grdMigrationToPrometheus.html
http://www.telerik.com/help/radcontrols/prometheus/?ajxMigration.html

If the problem persists, I will appreciate if you provide more details about the error (stack trace and more detailed explanation when the problem surfaces). Thus I will do my best to provide more to-the-point answer/fix.
 
Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Golden Gains
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or