解决方案 »

  1.   

    应该没有的吧,你实在想做到那个效果,就加一列显示行名字好了,绑定的datatable追加一列就可以了。
      

  2.   

    dataGridView1.Rows[i].HeaderCell.Value
      

  3.   

     datagridview.Columns[0].HeaderCell.Value = "AQI";
     datagridview.Columns[1].HeaderCell.Value = "PM2.5";          
      

  4.   

            dataGridView1.RowPostPaint += new DataGridViewRowPostPaintEventHandler(dataGridView1_RowPostPaint);        private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
            {
                Rectangle rect = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y, dataGridView1.RowHeadersWidth - 4, e.RowBounds.Height);
                TextRenderer.DrawText(e.Graphics, "行名称", dataGridView1.RowHeadersDefaultCellStyle.Font, rect, 
                                      dataGridView1.RowHeadersDefaultCellStyle.ForeColor, 
                                      TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
            }
      

  5.   

    参照二楼的写法就好了
    dataGridView1.Rows[i].HeaderCell.Value