效果如图:

合并 DataGrid 中相同数据的行。
把下面这段代码 COPY 在 DataGridItem_DataBind 事件处理程序 或 其他自己写的方法中都可以

合并 DataGrid 中相同数据的行。
合并 DataGrid 中相同数据的行。            
if(DataGrid1.Items.Count <= 1)
合并 DataGrid 中相同数据的行。                
return;
合并 DataGrid 中相同数据的行。            TableCell oldTc 
= DataGrid1.Items[0].Cells[0];
合并 DataGrid 中相同数据的行。            
合并 DataGrid 中相同数据的行。            
for(int i=1;i<DataGrid1.Items.Count;i++)
            }

// from CSDN, 原贴: http://dev.csdn.net/article/41/41567.shtm

相关文章:

  • 2021-11-27
  • 2021-10-28
  • 2022-01-15
  • 2022-02-20
  • 2021-05-18
  • 2021-11-24
  • 2021-08-29
  • 2021-06-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2022-02-24
相关资源
相似解决方案