简体   繁体   中英

Display Data in a table win form C#

I need to present data in a tabular form in windows form using c#. Basically, I will extract data from received messages (not database) then display it in a table by specifying the column and row.

First, I started with TableLayoutPanel but I discovered that I should add controls for each cell which is not what I need and it is tedious.

Do you have any better suggestion? Much appreciated.

I think you're best off using a DataGridView , see this link .

It allows you to assign a datasource (which you can specify yourself). The image below demonstrates one of many ways that you can make your dataview look like.

在此处输入图片说明

There is even a nice tutorial which you can follow right here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM