问题描述
Hi Everybady,
我想在c#中创建一个表。但请仔细阅读我的问题。
我在MSsql中有2列表格
column1- as CustomerId
column2 as Drawtime
在C#Windows Applcation中,我从此表中获得完整的数据。
我的DataTable中的数据显示如下。
CustomerId | DrawTime
1 09:00
2 09:15
3 09:30
现在我想使用c#在Form上显示这样的
| 1 | 09:00 | 2 | 09:15 | 3 | 09:30 | 4 | 09:45 | 5 | 10:00 |
| 6 | 10:15 | 7 | 10:30 | 8 | 10:45 | 9 | 11:00 | 10 | 11:15 |
谁在这样的表格中显示记录。请帮我指导
我。
我不明白如何显示这样的记录。
我正在使用datagridview但是在这个控件中是不可能的。
谢谢
Ram Kumar
Hi Everybady,
I want to create a table in c#. But Please read my problem carefully.
I have table in MSsql with 2 column
column1- as CustomerId
column2 as Drawtime
In C# Windows Applcation i get the complete data from this table.
My Data in DataTable display like this.
CustomerId | DrawTime
1 09:00
2 09:15
3 09:30
Now I want to display on Form using c# like this
|1 | 09:00 | 2 | 09:15 | 3 | 09:30 | 4 | 09:45 | 5 | 10:00 |
|6 | 10:15 | 7 | 10:30 | 8 | 10:45 | 9 | 11:00 | 10 | 11:15 |
Who to display record in table like this. Please help me guide
me.
I do not understand how to display record like this.
I am using datagridview but it is not possible in this control.
thanks
Ram Kumar
推荐答案
this.listView1.Items.Add(new ListViewItem(Text = string.Format("|{0}|{1}", CustomerId, DrawTime)));
为控件选择合适的宽度,以便显示5个图标
Choose an appropriate width for the control so that 5 "icons" are displayed
这篇关于需要在c#中创建表格格式(windows应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!