HI I am doin a project in C#.Net windows application.I need codings to get the data enetered in the t开发者_StackOverflowextboxcolumn of my gridview .Thank u
It would be something like this sudo code.
To get the value:
string value = gridview.Rows[n].Cells[n].Value.ToString();
To set the value:
gridview.Rows[n].Cells[n].Value = "Value";
Where 1st n equals the rows number and 2nd n equals the column number. Row and Column numbers are 0 based indexes.
On Row data bound you will get tha data of each rows having textbox field.
TextBox txtEndDate= (TextBox)grdTravelDetails.Rows[rowIndex].Cells[7].FindControl("txtEndDate");
and the access the textbox value (txtEndDate.text)
精彩评论