本帖最后由 zhenghq1001 于 2012-05-09 13:26:40 编辑

解决方案 »

  1.   


    DataGridViewCell cell = dgv[0, 0];
    Rectangle rect = cell.ContentBounds;
      

  2.   

    监听 CellPainting 事件  在事件处理程序中绘制线条
      

  3.   


    private void dataGridView1_CellPainting(object sender,     system.Windows.Forms.DataGridViewCellPaintingEventArgs e)
    {
        //e.CellBounds为单元格的区域,找到对应中心就很容易
        //把值绘制在单元格中 e.Value
        e.Handled=true; //不能漏了这句
    }
      

  4.   

    不建议你在DataGridView里做这些东西,还是自绘控件来到方便。