开发者

Textboxcolumn /gridview in C#.Net

开发者 https://www.devze.com 2023-02-02 08:05 出处:网络
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 uIt would be something like this sudo code.

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号