Re: Problem with Event handlers for Dynamic created Controls in DatGri
- From: billmiami2@xxxxxxxxxxxx
- Date: 10 May 2005 06:17:24 -0700
A few things come to mind:
*Why do you need to dynamically add the linkbutton to the datagrid?
Why can't you place the linkbutton into the datagrid at design time and
then simply set its visibility based on the situtation? Handling
events for controls added at runtime can be tricky as you need to pay
close attention to the sequence of page and control events.
*Is there anywhere in your code or tags where you specify that the
onItemCommand event for the datagrid will be handled by your procedure
datagrid1_ItemCommand?
*Is the viewstate on your datagrid enabled?
*If you intend to trap and process the click event for your linkbutton
in the datagrid's ItemCommand event, why are you assigning a different
event handler (lButton_Click) to handle it?
*At what point in the page are you binding data to the datagrid and how
often? Are you rebinding with each postback?
Bill E.
Hollywood, FL
.
- References:
- Problem with Event handlers for Dynamic created Controls in DatGri
- From: Shiju Poyilil
- Problem with Event handlers for Dynamic created Controls in DatGri
- Prev by Date: Can I include ASP pages?
- Next by Date: Re: Web request with an existing cookie...
- Previous by thread: Re: Problem with Event handlers for Dynamic created Controls in DatGri
- Next by thread: Re: "An error was encountered whilst attempting to start your sess
- Index(es):