/// <summary>
    /// 设定GirdView列宽度
    /// </summary>
    /// <param name="sourceView"></param>
    /// <param name="width"></param>
    public void SetGridViewColumnWidth(GridView sourceView)
    {
        double cellWidth = sourceView.Width.Value;
        for (int i = 0; i < sourceView.Rows.Count; i++)
        {
            for(int j = 0;j < sourceView.Rows[i].Cells.Count;j++)
            {
                sourceView.Rows[i].Cells[j].Width = Convert.ToInt16(cellWidth);
            }
        }
    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-05
  • 2021-11-04
  • 2022-12-23
  • 2022-02-07
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案