WinForms datagrid反转,以便列标题成为(重复)行标签 [英] WinForms datagrid inverted so that column headers become (repeating) row labels
问题描述
我希望在数据感知的WinForms网格控件中显示多个记录,以使列标题成为(重复)行标签.任何主要的第三方WinForms控件供应商的网格都具有此功能,或者可以使用内置的网格控件来完成此功能吗?还是有一种方法可以在提供重复垂直组的控件中使用标签,文本框和日期选择器对其进行仿真?
I'm looking to display multiple records in a data-aware WinForms grid control, such that the column-headers become (repeating) row-labels. Does the grid of any of the major third-party WinForms control vendors have this feature, or can it be done with the built-in grid control? Or is there a way to simulate it using labels and textboxes and datepickers in a control that offers repeating vertical groups?
City xxxxxxxxxxxxxxxxxxxxxx
State xx
Zip xxxxx
Note xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------
City xxxxxxxxxxxxxxxxxxxxxx
State xx
Zip xxxxx
Note xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-------
City xxxxxxxxxxxxxxxxxxxxxx
State xx
Zip xxxxx
Note xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
推荐答案
有没有一种方法可以使用标签和文本框来模拟它,并且 提供重复垂直分组的控件中的日期选择器?
Is there a way to simulate it using labels and textboxes and datepickers in a control that offers repeating vertical groups?
您可以使用以下任一选项:
You can use either of these options:
-
DataReapter
您可以使用DataRepeater
控件.
DataReapter
You can use aDataRepeater
control.
Visual Basic Power Packs
DataRepeater
控件是可滚动的 显示重复数据(例如,行)的控件的容器 在数据库表中.它可以用作替代DataGridView
控制何时需要对布局进行更多控制 数据.DataRepeater
通过以下方式重复"一组相关的控件 在滚动视图中创建多个实例.这使用户能够 同时查看多条记录.
The Visual Basic Power Packs
DataRepeater
control is a scrollable container for controls that display repeated data, for example, rows in a database table. It can be used as an alternative to theDataGridView
control when you need more control over the layout of the data. TheDataRepeater
"repeats" a group of related controls by creating multiple instances in a scrolling view. This enables users to view several records at the same time.
TableLayoutPanel或FlowLayoutPanel中显示的自定义UserControl
您可以创建一个自定义UserControl
,它以这种方式显示一条记录,然后使用TableLayoutPanel
或FlowLayoutPanel
显示所有记录.
Custom UserControl shown in TableLayoutPanel or FlowLayoutPanel
You can create a custom UserControl
which shows a record this way and then using a TableLayoutPanel
or FlowLayoutPanel
show all records.
自定义DataGridViewColumn
您可以创建一个自定义DataGridViewColumn
,它托管一个复杂的(用户控件),以这种方式在行后显示整个对象.
Custom DataGridViewColumn
You can create a custom DataGridViewColumn
hosting a complex (user control) which shows the whole object behind the row this way.
这篇关于WinForms datagrid反转,以便列标题成为(重复)行标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!