﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - Error on Grid with Ajax Extender in CellTemplate </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-on-Grid-with-Ajax-Extender-in-CellTemplate/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Error on Grid with Ajax Extender in CellTemplate </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-on-Grid-with-Ajax-Extender-in-CellTemplate/</link><pubDate>Fri, 22 Jan 2010 04:07:54 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><category>WebGrid</category><description>&lt;p /&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Hi Guillermo,&lt;/span&gt;&lt;span style="font-size: 9pt; "&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;     I am able to replicate the error that you had.
From what I concern, perhaps ModalPopupExtender is not intended to be used that
way, i.e., in Grid's classic paging scenario. Sorry for the inconvenience, I hope it helps. Thank you.&lt;/span&gt;&lt;span style="font-size: 9pt; "&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;span style="font-size: 9pt; "&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-top: 7.5pt; margin-right: 0in; margin-bottom: 7.5pt; margin-left: 0in; "&gt;&lt;span style="font-family: 'lucida sans unicode', sans-serif; color: black; font-size: 9pt; "&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;span style="font-size: 9pt; "&gt;&lt;o:p /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;o:p&gt;&lt;span style="font-size: 9pt; "&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>Error on Grid with Ajax Extender in CellTemplate </title><link>http://www.intersoftsolutions.com/Community/WebGrid/Error-on-Grid-with-Ajax-Extender-in-CellTemplate/</link><pubDate>Thu, 21 Jan 2010 18:25:18 GMT</pubDate><dc:creator>Gmontes</dc:creator><category>WebGrid</category><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This issue actually follows up on another issue that i reported on this &lt;a href="http://www.intersoftpt.com/Community/WebGrid/WebGrid-celltemplate-vanishes-when-paging/" target="_blank"&gt;thread&lt;/a&gt;. What I'm trying to do is add a hyperlink and an ajax modal extender (or any other extender for that matter) within a cell template. First page renders just fine, but when going to some other page in the grid I get:&lt;/p&gt;
&lt;p /&gt;
&lt;h2&gt;&lt;i&gt;&lt;span style="font-size: 8pt; "&gt;Extender control 'owhCompanyName_Child_ModalPopupExtender' is not a 
registered extender control. Extender controls must be registered using 
RegisterExtenderControl() before calling 
RegisterScriptDescriptors().&lt;br /&gt;Parameter name: extenderControl&lt;/span&gt;&lt;/i&gt; &lt;/h2&gt;
&lt;p /&gt;
&lt;p&gt;If we follow up on the solution given on this &lt;a href="http://www.intersoftpt.com/Community/WebGrid/How-to-create-template-Cell-programmatically/" target="_blank"&gt;other thread&lt;/a&gt;... I can replicate this by modifying the celltemplate to look like this:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;public class cellTemplate : ITemplate
    {
        Label labelTemplate;
        public void InstantiateIn(Control container)
        {
            HyperLink hyperlink = new HyperLink() { ID = "hyperlink" };
            LinkButton linkButton = new LinkButton() { ID = "LinkButton", Visible = false };
            Panel popup = new Panel() { ID = "Panel", CssClass="modalPopup" };
            HtmlGenericControl iframe = new HtmlGenericControl() { TagName = "iframe"};
            popup.Style[HtmlTextWriterStyle.Display] = "none";
            popup.Controls.Add(iframe);
            iframe.Attributes["src"] = "about:blank";
            
            // To fix when definitive CSS is done
            ModalPopupExtender extender = new ModalPopupExtender() { ID = "ModalPopupExtender", BackgroundCssClass="modalPopupBackground" };
            extender.TargetControlID = linkButton.ID;
            extender.PopupControlID = popup.ID;
            iframe.ID = iframe.Parent.ID &amp;#43; "IFrame";
            hyperlink.NavigateUrl = "www.google.com";
            hyperlink.Text = "Text";
            linkButton.Text = "Text";
            container.Controls.Add(hyperlink);
            container.Controls.Add(linkButton);
            container.Controls.Add(popup);
            container.Controls.Add(extender);
        
        }
    }&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;And moving the celltemplate insertion to OnInitializeLayout:&lt;/p&gt;
&lt;p /&gt;&lt;pre&gt;        WebGridColumn newColumn = new ISNet.WebUI.WebGrid.WebGridColumn();
        newColumn.ColumnType = ISNet.WebUI.WebGrid.ColumnType.Template;
        newColumn.CellTemplate = new cellTemplate();
        newColumn.Width = 300;
        newColumn.Caption = "Templated Column";
        WebGrid1.RootTable.Columns.Add(newColumn);&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p /&gt;
&lt;p&gt;And the aspx will need a Script Manager. Then load the grid, go to any other page and the error will show up in the status bar.&lt;/p&gt;
&lt;p&gt;Thanks &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>