How to set the MoveFirst in a DataGridView

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nadee
    New Member
    • Aug 2007
    • 1

    How to set the MoveFirst in a DataGridView

    pls tell someone how to set the MoveFirst (set to the first row) in a DataGridView by setfocusing..
  • rajaramanindia
    New Member
    • Jan 2007
    • 6

    #2
    Try this method it might be helpful

    protected void GridView1_RowDa taBound(object sender, GridViewRowEven tArgs e)
    {

    if (e.Row.RowType == DataControlRowT ype.DataRow && (e.Row.RowState & DataControlRowS tate.Edit) != 0)
    {
    Control c = e.Row[0].Cells[0].Controls[0];
    this.SetFocus(c );
    }

    }

    Comment

    Working...