gridview合并行
public void GroupRows(GridView p_GridView, int[] p_ColumnsIndex)
{
int _Count = p_GridView.Rows.Count;
string[] _TempText = new string[p_ColumnsIndex.Length];
int[] _RowIndex = new int[p_ColumnsIndex.Length];
for (int i = 0; i != _Count; i++)
{
string _CellText = "";
for (int z = 0; z != p_ColumnsIndex.Length; z++)
{
_CellText += p_GridView.Rows[i].Cells[p_ColumnsIndex[z]].Text;
if (_TempText[z] == _CellText)
{
p_GridView.Rows[i].Cells[p_ColumnsIndex[z]].Visible = false;
p_GridView.Rows[_RowIndex[z]].Cells[p_ColumnsIndex[z]].RowSpan++;
}
else
{
_RowIndex[z] = i;
_TempText[z] = _CellText;
p_GridView.Rows[_RowIndex[z]].Cells[p_ColumnsIndex[z]].RowSpan = 1;
}
}
}