UltraGrid 中的组合框
我必须对使用 Infragistics NetAdvantage 2006 的旧 VB.NET 应用程序 (Visual Studio 2003) 进行一些维护。
我需要向现有 UltraGrid 控件添加一列。 这个新列必须像组合框一样,允许从值列表中进行选择。
我添加了新列,并将样式设置为 DropDownValidate。 我创建了一个 ValueList 并将其分配给新列。
在运行时我没有得到预期的结果。 我缺少什么?
I have to do some maintenance on an old VB.NET application (Visual Studio 2003) that uses Infragistics NetAdvantage 2006.
I need to add a column to an existing UltraGrid control. This new column must act like a ComboBox, allowing the selection from a list of values.
I added the new column, and set the Style to DropDownValidate. I created a ValueList and assigned it to the new column.
At run-time I don't get the expected results. What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
像这样的东西应该适合你:
Something like this should work for you:
此代码对我有用:
ultraGridValueList.ValueListItems.Add("ValueMemeber1", "DisplayMemeber1"); ultraGridValueList.ValueListItems.Add("ValueMemeber2", "DisplayMemeber2"); ultraGridValueList.ValueListItems.Add("ValueMemeber3", "DisplayMemeber3"); ultraGridValueList.ValueListItems.Add("ValueMemeber4", "DisplayMemeber4");
ultraGrid1.DisplayLayout.Bands[0].Columns["myDropDownCol"].ValueList = ultraGridValueList;
我通常将样式保留为默认值。
This code works for me:
ultraGridValueList.ValueListItems.Add("ValueMemeber1", "DisplayMemeber1"); ultraGridValueList.ValueListItems.Add("ValueMemeber2", "DisplayMemeber2"); ultraGridValueList.ValueListItems.Add("ValueMemeber3", "DisplayMemeber3"); ultraGridValueList.ValueListItems.Add("ValueMemeber4", "DisplayMemeber4");
ultraGrid1.DisplayLayout.Bands[0].Columns["myDropDownCol"].ValueList = ultraGridValueList;
I generally leave the style as default.