列视图或类似表格的东西 [英] Column View or Something like a table
问题描述
大家好,
我想知道一些信息,我有一堆信息,这些信息会不断变化,但是它们的标识符不会改变.我需要一种很好的方式来像excel表类型结构一样显示它们:
ID C1 C2 C3 C4 C5 C6 C7 C8
ID不会改变,因此会有多个ID,并且随着数据流的传输,我将对其进行排序并相应地显示它们.
我当时正在考虑使用Datagridview,但我没有使用数据库,因此该选项已经退出,我只需要一些东西就可以正确查看它.
使用Visual Studio Express
Hi Everyone,
I would like to know something, I have a whole bunch of info, that will be constantly changing, however their identifiers won''t be. I need a nice way of displaying them in like an excel table type structure:
ID C1 C2 C3 C4 C5 C6 C7 C8
ID''s wont be changing so there will be multiple ID''s and as the data is streaming through I will sort them and display them accordingly.
I was thinking about using a Datagridview, BUT i''m not using a Database hence that option is out, I just need something to view it properly on.
Using Visual Studio Express
推荐答案
您不需要数据库即可使用DataGridView,这使初始设置更加容易. 您可以手动设置:
You don''t need a database to use a DataGridView - it just makes the initial setup easier.
You can set it up manually:
DataGridViewTextBoxColumn forenameColumn = new DataGridViewTextBoxColumn();
forenameColumn.HeaderText = "Forename";
forenameColumn.ValueType = typeof(string);
forenameColumn.Frozen = true;
MyDataGridView.Columns.Add(forenameColumn);
DataGridViewTextBoxColumn surnameColumn = new DataGridViewTextBoxColumn();
surnameColumn.HeaderText = "Surname";
surnameColumn.Frozen = true;
surnameColumn.ValueType = typeof(string);
MyDataGridView.Columns.Add(surnameColumn);
MyDataGridView.Rows.Add("John", "Smith");
MyDataGridView.Rows.Add("Chris", "Maunder");
这篇关于列视图或类似表格的东西的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!