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
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