private void gvRender()
     {
         if (GridView1.Rows.Count <= 1)
         {
             return;
         }
         for (int i = 0; i < GridView1.Columns.Count; i++)
         {
             TableCell oldtc = GridView1.Rows[0].Cells[i];
             for (int j = 1; j < GridView1.Rows.Count; j++)
             {
                 TableCell newtc = GridView1.Rows[j].Cells[i];
                 if (newtc.Text == oldtc.Text)
                 {
                     newtc.Visible = false;
                     if (oldtc.RowSpan == 0)
                     {
                         oldtc.RowSpan = 1;
                         oldtc.RowSpan = oldtc.RowSpan + 1;
                         oldtc.VerticalAlign = VerticalAlign.Middle;
                     }
                     else
                     {
                         oldtc = newtc;
                     }
                 }
             }
         }
     }

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2022-02-13
  • 2022-01-18
  • 2022-12-23
  • 2021-11-27
  • 2021-12-12
猜你喜欢
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案