如何在 Dynamics AX 4.0 中显示工具提示?

发布于 2024-12-23 17:42:35 字数 180 浏览 3 评论 0原文

我希望将悬停文本添加到具有行特定数据的网格中的给定列。我计划覆盖鼠标输入事件,但我不确定如何填充工具提示并将其显示在鼠标旁边。

任何方向将不胜感激,谢谢!

**编辑:看起来重写的方法实际上称为“Tooltip”。我能够覆盖它并显示一个工具提示。

问题仍然存在:如何访问工具提示所在列的当前行数据?

I'm looking to add hover text to a given column in a grid with row specific data. I'm planning on overriding the mouse-enter event, but I'm unsure how to populate a Tooltip and have it display next to the mouse.

Any direction would be appreciated, thanks!

**Edit: It looks like the method to override is actually called "Tooltip". I was able to override this and get a tooltip to display.

The question remains: How to access the current row's data for the column that the Tooltip is on?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

许一世地老天荒 2024-12-30 17:42:35

要显示带有外键字段描述的工具提示,必须满足以下条件:

  1. 将字段基于扩展数据类型
  2. 在扩展数据类型上建立关系
  3. 让关系指向基表
  4. 设置 TitleField1<基表上的 /code> 和 TitleField2 属性 在
  5. 基表的关键字段上有唯一索引

您可以将关系放在(事务)表上,而不是扩展数据类型上。
在 AX 2012 中执行此操作,或者如果关系有多个要连接的字段。

To show a tooltip with the description of the foreign key field, the following must be met:

  1. Base your field on an extended data type
  2. Put a relation on the extended data type
  3. Have the relation point to a base table
  4. Set the TitleField1 and TitleField2 attributes on the base table
  5. Have a unique index on the key fields of your base table

You can put the relation on the (transaction) table instead of the extended data type.
Do that in AX 2012 or if the relation has more than one field to join.

诠释孤独 2024-12-30 17:42:35

这是我最终使用的工具提示代码:

public str toolTip()
{
    ;
    return tblYourTable::find(this.value()).Description;
}

**编辑 Jan 的评论以大大简化代码

Here's the tooltip code that I ended up using:

public str toolTip()
{
    ;
    return tblYourTable::find(this.value()).Description;
}

**Edit per Jan's comment to greatly simplify code

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文