UltraComboBox 上的 NullText 行为

发布于 2024-12-01 14:22:49 字数 454 浏览 3 评论 0原文

我在表单任务管理器屏幕中使用 Infragistics 的 UltraComboBox

AssignTo

UltraComboBox 的下拉按钮隐藏,并且自动完成处于活动状态因此,用户可以输入几个字母来检索用户名,从而将某人分配给任务。

但是,用户可以通过单击橡皮擦图标,将 ComboBox 的内部值设置为 null 来让任务“未分配”:

private void SetNotAssigned_Click(object sender, EventArgs e)
{
    AssignedToComboBox.Value = null;
}

而不是让我的 ComboBox 填充其 NullText 属性(“未分配”),它是空白的。为什么 ?

I am using a UltraComboBox from Infragistics in a forms Task Manager screen

AssignTo

The UltraComboBox has its dropdown button hidden, and AutoCompletion is active so the user can type a couple of letters to retrieve an user name to assign someone to a task.

However, the user has the possibility to let the task "Not assigned" by clicking the eraser icon, setting the internal value of the ComboBox to null :

private void SetNotAssigned_Click(object sender, EventArgs e)
{
    AssignedToComboBox.Value = null;
}

Instead of having my ComboBox filled with its NullText property ("Not assigned"), it is blank. Why ?

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

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

发布评论

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

评论(1

看海 2024-12-08 14:22:49

我刚刚找到原因了。

我必须将 AlwaysInEditMode 设置为 false。

看起来 Infragistics 正在使用一个隐藏的文本框,该文本框在编辑期间出现,然后消失。我怀疑此 TextBox 行为并不总是预期的行为。 AlwaysInEditMode 似乎使隐藏的 TextBox 始终处于打开状态。

I just found why.

I had to put AlwaysInEditMode to false.

It looks like Infragistics is using a hidden TextBox that appears during edition and disappears afterwards. I suspect this TextBox behavior is not allways the expected one. AlwaysInEditMode seems to make that hidden TextBox on all the time.

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