Maybe I can simplify my explanation.
I need to capture the value entered into the textbox when the user changes
it, but if the grid isn't re-bound on the postback, the textbox that my
quantity is entered into doesn't exist and I can't handle the event. On the
other hand, if I do re-bind on the postback, I loose the event handler for
the remove button.
Currently, I handle the remove button click (it's an image button in a
template column of the grid) in the ItemCommand event of the grid. Can I
handle the button as I would a regular button (ie. capture the click event
instead of the itemcommand event) or would that event handler be wiped out
just the same because it's within the grid? I'll try to code this, but if
someone can shed some light on this so I don't stray too far down the wrong
path, I'd appreciate it.
Thanks.
"mwhalen" wrote:
Hi,
I have a page that has a datagrid bound to a dataset. Items are added to
the dataset at particular times (ie the click event of an item in a tree
control) then bound to the grid. The grid has an image button in a Template
column that is used to remove an item (dataset row). I can't re-bind the
grid on the postback or I lose the event handler for the button. I also have
a column that contains a textbox that I need to handle the TextChanged event,
but because of not being able to bind on the postback, I lose the binding to
the grid before I get to the event handler. How can I either prevent or work
around this?
--
Thanks