惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
美团技术团队
V
Visual Studio Blog
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
有赞技术团队
有赞技术团队
GbyAI
GbyAI
宝玉的分享
宝玉的分享
腾讯CDC
M
MIT News - Artificial intelligence
博客园 - 【当耐特】
Google DeepMind News
Google DeepMind News
月光博客
月光博客
MyScale Blog
MyScale Blog
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
Recent Announcements
Recent Announcements
MongoDB | Blog
MongoDB | Blog

博客园 - sunrack

LINQ to SQL语句之Group By/Having和Exists/In/Any/All/Contains C++/CLI托管字符串与非托管char数组的转换 程序员从初级到中级10个秘诀 Get JavaScript IntelliSense With DevExpress Client-Side Objects - v2010 vol 1 Grid Editing - Cascading Combo Boxes - sunrack ASPxRadioButtonList 报错解决办法 - sunrack - 博客园 本地连接属性“出现意外错误”的解决办法 - sunrack - 博客园 Bootstrap DotNetFX35SP1 in Visual Studio 2010 Windows Server 2008 共享策略 XtraPivotGrid Custom Summaries 手动注册 DevExpress 8.2.3 控件到 Visual Studio 工具箱 sn.exe error "Failed to generate a strong name key pair -- The keyset is not defined" Thread Tools Rate Thread 浅析JavaScript中的showModalDialog的实战应用 javascript showModalDialog模态对话框使用说明 - sunrack - 博客园 entity framework 缓存干扰的数据不一致问题 Failed to load viewstate ? Typical problem, with an obvious solution. ViewState and Dynamic Control ASPxGridView 和 AJAX Extensions ToolBox 不兼容 ASPxCombobox Features
ASPxPopupControl does not show up in the right place
sunrack · 2011-02-25 · via 博客园 - sunrack

Created by Haithem at 2010/6/4 23:28:11
Attachment: Project.rar (27522 bytes)

Hi there,

I am trying to follow your example, so i can warn the user for some requirement

http://demos.devexpress.com/ASPxperienceDemos/PopupControl/ClientSideAPI.aspx

I have attached a test project, in which i have the aspxtextbox within an aspxnavbar. My issue is the aspxpopcontrol does not show near by the appropriate element. Could you check what i am doing wrong here.

Thank you for your help
Reviewed by DevExpress Team at 2010/6/5 1:45:51

Processed (Answered) by DevExpress Team at 2010/6/7 11:53:22
Attachment: Project_Q261869.zip (32759 bytes)

Hello Mohamed Haithem,

I'd like to note that the PopupWindow.PopupElementID property requires a Control.UniqueID. However, if a control resides in a naming container (ASPxNavBar in your situation, or similar), then its Control.UniqueID doesn't equal Control.ID and Control.ClientInstanceName. In your case, the ASPxTextBox.UniqueID is formed dynamically.

As a solution, I suggest that you set the PopupElementID property at runtime. For example:

[C#]

protected void Page_Load(object sender, EventArgs e) {
    ASPxTextBox txt1 = ASPxNavBar1.Groups[0].FindControl("text1") as ASPxTextBox;
    pcErrorW.Windows[0].PopupElementID = txt1.UniqueID;

    ASPxTextBox txt2 = ASPxNavBar1.Groups[1].FindControl("text2") as ASPxTextBox;
    pcErrorW.Windows[1].PopupElementID = txt2.UniqueID;
}
I've modified your project accordingly. Please check it, and let me know the result.

Thanks,
Marion



protected void Page_Load(object sender, EventArgs e) {
ASPxTextBox txt1
= ASPxNavBar1.Groups[0].FindControl("text1") as ASPxTextBox;
pcErrorW.Windows[
0].PopupElementID = txt1.UniqueID;

ASPxTextBox txt2

= ASPxNavBar1.Groups[1].FindControl("text2") as ASPxTextBox;
pcErrorW.Windows[
1].PopupElementID = txt2.UniqueID;
}