I've created a RadGrid and added a 'text box' to a bound column during the ItemDataBound event:
public void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
add the text box...
TextBox txtBox =
new TextBox();
txtBox.ID =
"txtQty" + e.Item.ItemIndex.ToString();
txtBox.Attributes.Add(
"runat", "server");
e.Item.Cells[4].Controls.Add(txtBox);
}
}
Textbox adds fine, Shows up in grid, but when posted back, is not available in grid. I'm not rebuilding the grid on postback since I don't want to loose the values.
The grid is not in edit mode -- I need the text boxes on all rows so the user does not want to click 'edit' each time they want to add a value. Upon postback, I want to read each row and check to see if the data is different than originally loaded.
What am I missing here?
Thanks!