使用数据表隐藏重复的行 [英] hiding duplicate row using Datatable
问题描述
我有类似的情况,例如我有包含类似
值的表
ord_id产品名称
------ -------------
1 xxx
-----------------
2 xyz
---------------
2 xyw
---------------
3 yzx
---------------
在上面的示例中,我有两行具有相同的ord_id,但具有不同的产品名称.我正在使用数据网格来显示详细信息.我想在我的数据网格中显示以上值,如下所示
ord_id产品名称
------ -------------
1 xxx
----------------
2 xyz
xyw
---------------
3 yzx
---------------
我该怎么做.请为我解决这个问题
i have scenario like i have table which contains values like
ord_id product_name
------ -------------
1 xxx
-----------------
2 xyz
---------------
2 xyw
---------------
3 yzx
---------------
in the above example i have two rows with same ord_id but with different product name. i am using a data grid to show the details. i want to show the above values in my data grid as below
ord_id product_name
------ -------------
1 xxx
----------------
2 xyz
xyw
---------------
3 yzx
---------------
how can i do this.please help me in this
推荐答案
为您的网格创建一个模板,该模板将两个字符串合并并显示在一个列中.
您使用的是C#2.0还是3.5?
By creating a template for your grid that merges the two strings and displays them in the one column.
Are you using C# 2.0, or 3.5 ?
这篇关于使用数据表隐藏重复的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!