如何在 Infragistics wingrid 中以垂直格式列出数据
通常(并且自然地),列表中的每个条目都显示在网格控件中的一行中,但在某些情况下,我需要以垂直格式(即在一列中)显示每个条目。
例如,对于一个简单的网格,如:
- 姓名 电子邮件 年龄 地址
- John [email protected] 30 John 的地址
- Joe [email protected] 30 Joe 的地址
- Tom [email protected] 30 Tom 的地址
是否可以在 Infragistics wingrid 中将其显示为:
- 姓名 John Joe Tom
- 电子邮件 [电子邮件受保护] [电子邮件受保护] [email protected]
- 年龄 30 30 30
- 地址 John 的地址 Joe 的地址 Tom 的地址
这样做的一个原因是每个条目的字段太多,用户认为如果它们都在同一列而不是同一行,导航会更容易。
我知道我可以手动转换原始数据源并以垂直格式构建另一个业务对象,但这感觉很尴尬,因为新的 BO 并没有真正呈现其真正含义的本质。
非常感谢任何帮助..谢谢。
Normally (and naturally), each entry in a list is presented in a row in the grid control, but there're cases when I need to show each entry in a vertical format, i.e. in a column.
For example, for a simple grid like:
- Name Email Age Address
- John [email protected] 30 John's address
- Joe [email protected] 30 Joe's address
- Tom [email protected] 30 Tom's address
Is it possible to show it in Infragistics wingrid as:
- Name John Joe Tom
- Email [email protected] [email protected] [email protected]
- Age 30 30 30
- Address John's adddress Joe's address Tom's address
One reason of doing this is because there're too many fields for each entry and the user thinks it would be easier to navigate if they're all in the same column instead of the same row.
I know I can manually transform the original data source and build another business object in the vertical format, but it feels awkward because the new BO doesn't really present the nature of what it really means.
Any help is very much appreciated..Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尼科是对的。
CardView
应该可以满足您在这里的需求。请让我为您提供有关此属性的更多详细信息:
UltraGrid
的InitializeLayout
事件中。为了实现所需的外观,您可能会使用以下代码:
有关 CardView 样式的更多一般信息,请查看 这里。
Nico is right.
CardView
should do what you are looking for here.Please let me provide you more details about this property:
InitializeLayout
event of yourUltraGrid
.In order to achieve the desired look you would probably use the following code:
For more general information about the CardView style please take a look here.
您是否尝试将
CardView
属性设置为活动状态?这应该可以解决你的问题。
Did you try to set the
CardView
property as active?This should solve your problem.