Footer PostBack

J

Jeremy

Hi

Currently I am adding a TextBox to the Footer with the OnItemCreated
Event


if (e.Item.ItemType = ListItemType.Footer) then
Begin
dgItem :=
DataGridItem.Create(e.Item.ItemIndex,e.Item.ItemIndex,ListItemType.Foote
r);
dgCell := TableCell.Create;
dgCell.ColumnSpan := e.Item.Cells.Count;
dgItem.Cells.Add(dgCell);
dgCell.Text := 'Comment<BR>';
myComment := TextBox.Create;
myComment.Text := Assessment.FComment;
dgCell.Controls.Add(myComment);
Controls[0].Controls.AddAt(e.Item.ItemIndex,dgItem);
End;



Now when I cause a postback the textbox keeps the changed value but
when i do a ReverseBind to save the changes back to the Custom Object
it does not even know a Footer exists....


If (self.Items.itemType = ListItemType.Footer) then
Begin
textbox := (self.Items.Cells[Columns.Count-1].Controls[0]
as System.Web.UI.WebControls.TextBox);
if Assigned(textbox) then
if textbox.ID = 'Comment' then
Assessment.FComment := textbox.Text
End;



Any Ideas.

TIA
Jeremy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top