I have a grid with text box,
I change the text box to be AutoPostBack="true"
when I change the data I have event that insert the data to the DB.
how can I go th the next row in the grid.Code:protected void mark_TextChanged(object sender, EventArgs e) { TextBox t = (TextBox)sender; GridViewRow grdRow = (GridViewRow)t.Parent.Parent; Label l = (Label)grdRow.FindControl("questionID"); // HERE I INSERT THE DATA TO THE DB //TRY TO GO TO THE TEXT BOX IN THE NEXT ROW grdRow = new GridViewRow(grdRow.RowIndex + 1,grdRow.DataItemIndex,DataControlRowType.DataRow, DataControlRowState.Normal); l = (Label)grdRow.FindControl("questionID"); //BREAK HERE Page.ClientScript.RegisterStartupScript(this.GetType(), "aaa", "document.getElementById('" + l.ClientID + "').focus()", true);
thanks!




Reply With Quote