//隐藏dataGrid1不需要的列

private void btnSubmit_Click(object sender, EventArgs e)

        {           
            DataGridTableStyle ts = new DataGridTableStyle();
            DataSet ds = new DataSet();
            ds = WebPublicClass.PublicClass.GetWeb().W_PierType();
            dataGrid1.DataSource = ds.Tables[0]; 
            ts.MappingName = ds.Tables[0].TableName;         
            dataGrid1.TableStyles.Add(ts);
            dataGrid1.TableStyles[0].GridColumnStyles[0].Width = 0;
            
        }

相关文章:

  • 2021-11-10
  • 2021-09-04
  • 2021-06-12
  • 2021-05-03
  • 2021-06-15
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2021-08-14
  • 2021-07-20
  • 2021-12-15
  • 2021-10-03
  • 2021-11-05
相关资源
相似解决方案