iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi,
This issue actually follows up on another issue that i reported on this thread. 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:
If we follow up on the solution given on this other thread... I can replicate this by modifying the celltemplate to look like this:
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 + "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); } }
And moving the celltemplate insertion to OnInitializeLayout:
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);
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.
Thanks
Hi Guillermo,
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.
Best Regards,
Andi Santoso
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname