开发者

Textboxcolumn /gridview in C#.Net

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜