How to show multiple values in datagridview cell

I am unware the fact that whether it is possible to show different values from access table to a single datagridview cell. For example. If table xyz contain data like this

col1 col2 col3 col4 Col5

B1 P1 P1 P2 P1/P1

B2 P1 P2 P3

B3 P1 P2 P3 B4

P2 P2 P3 P2/P2

I hope I am clear what I want to know? If this is possible how can I achieve this?

Regards to all.


if you want only show data then you need to convert ToString and then concatenate values of the wanted columns.

Just create a query where you do this( Access query ):

SELECT col1
, col2
, col3
, col4
, CStr(col2) + '/' + CStr(col3) AS col5
FROM yourTable
链接地址: http://www.djcxy.com/p/68834.html

上一篇: 用LINQ替换字符串值

下一篇: 如何在datagridview单元格中显示多个值