GridView добавление контролов в строку.
........................................
protected void Page_Load(object sender, EventArgs e)
{
CSDataClassesDataContext dataContext = new CSDataClassesDataContext(Utils.GetConnectionString());
if (!IsPostBack)
{
.....................
PriceGridView.DataSource = _price.PriceItems;
PriceGridView.RowDataBound += new GridViewRowEventHandler(PriceGridView_RowDataBound);
}
}
........
void PriceGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label SumLabel = (Label)e.Row.Cells[2].FindControl("SumLabel");
TextBox NTextBox = (TextBox)e.Row.Cells[2].FindControl("NTextBox");
.....
} }
Комментариев нет:
Отправить комментарий