J
JC
Hi,
I have a datagrid, and I want to bind this to a datatable, and I would
like to have textbox controls and one button control.
The problem is the textbox controls - they don't render, at run time
it just says 'System.Web.UI.WebControls.TableCell'
Any help would be appreciated.
TextBox txtQty = new TextBox();
txtQty.Text="erm";
TableCell oTc = new TableCell();
oTc.Controls.Add(txtQty);
DataTable oDt = new DataTable();
oDt.Columns.Add("Qty");
oDt.Columns.Add("Price");
oDt.Columns.Add("Details");
oDt.Columns.Add("Action");
DataRow oDr = oDt.NewRow();
oDr["Qty"] = oTc;
oDr["Price"] = "1";
oDr["Details"] = "1";
oDt.Rows.Add(oDr);
dgQty.DataSource = oDt;
dgQty.DataBind();
I have a datagrid, and I want to bind this to a datatable, and I would
like to have textbox controls and one button control.
The problem is the textbox controls - they don't render, at run time
it just says 'System.Web.UI.WebControls.TableCell'
Any help would be appreciated.
TextBox txtQty = new TextBox();
txtQty.Text="erm";
TableCell oTc = new TableCell();
oTc.Controls.Add(txtQty);
DataTable oDt = new DataTable();
oDt.Columns.Add("Qty");
oDt.Columns.Add("Price");
oDt.Columns.Add("Details");
oDt.Columns.Add("Action");
DataRow oDr = oDt.NewRow();
oDr["Qty"] = oTc;
oDr["Price"] = "1";
oDr["Details"] = "1";
oDt.Rows.Add(oDr);
dgQty.DataSource = oDt;
dgQty.DataBind();