RT = ?

解决方案 »

  1.   

    如果用代码给DGV添加数据的话,自动会有序列号,如果你手动给DGV添加一些列的话,就没有序列号。
      

  2.   

    序列号?
    是行号吗?private void dataGridView1_RowPostPaint(object sender,    DataGridViewRowPostPaintEventArgs e)
    {
         Rectangle rectangle = new Rectangle(e.RowBounds.Location.X, e.RowBounds.Location.Y,dataGridView1.RowHeadersWidth, e.RowBounds.Height);     TextRenderer.DrawText(e.Graphics, (e.RowIndex + 1).ToString(), dataGridView1.RowHeadersDefaultCellStyle.Font, rectangle, dataGridView1.RowHeadersDefaultCellStyle.ForeColor,
                    TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
    }
      

  3.   

    SELECT 序号= (SELECT COUNT(UserID) FROM UserStore AS a WHERE a.UserID <= b.UserID), UserName as 客户名 FROM UserStore AS b ORDER BY 序号
      

  4.   

    NND,分给错人了.sf的分应该要给bd的.
      

  5.   

    [toni_308]:我另外开了一贴,你来拿分吧.