Changing the text of a TaskResults control's ContextMenuItem prevents the item's click event from executing properly.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM010104
已提交
July 3, 2007
上次修改时间
December 20, 2024
适用范围
No Product Found
找到的版本
9.2
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
I don't know why this workaround works, but it does:In page load, run code (like that below) that will reset the menu caption to its original value ("Remove", e.g.). The altered caption will appear in the menu (TaskResults_Load will run after page load), but now the click event will run as expected (!).//call this function at the end of Page_Load - ResetItemText(2, "Remove"); void ResetItemText(int itemIndex, string itemCaption) { ContextMenu mnuResultsCtx = TaskResults1.TaskResultContextMenu; if (mnuResultsCtx.Items.Count > 0) { ContextMenuItem cmi = (ContextMenuItem)mnuResultsCtx.Items[itemIndex]; cmi.Text = itemCaption; } }