UltraComboBox 上的 NullText 行为
我在表单任务管理器屏幕中使用 Infragistics 的 UltraComboBox
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
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚找到原因了。
我必须将 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.