Loosing Datagrid events due to container naming corruption problems...Help

C

cmoore

While try to find out why sometime events were not being handled
item_command the following was found:

-Events, the control is lineitems, and the next line is normal
request("__EVENTTARGET") "LineItems:DataGridItems:_ctl3:Linkbutton2"

- When the problem occurs the control tree has been renamed from
Lineitems->4?
- which I suspect is why the event is not being handled..

request("__EVENTTARGET") "4:DataGridItems:_ctl3:Linkbutton2"


-- Normal control tree
LineItems ASP.WorkLineItems_ascx 3799 44
LineItems:_ctl0 System.Web.UI.LiteralControl 67 0
LineItems:DataGridItems System.Web.UI.WebControls.DataGrid 3549 188
LineItems:DataGridItems:_ctl0 System.Web.UI.WebControls.DataGridTable 3549 0
LineItems:DataGridItems:_ctl1 System.Web.UI.WebControls.DataGridItem 0 0
LineItems:DataGridItems:_ctl1:_ctl1 System.Web.UI.WebControls.TableCell 0 0
LineItems:DataGridItems:_ctl1:_ctl0 System.Web.UI.WebControls.Label 0 0
LineItems:DataGridItems:_ctl2 System.Web.UI.WebControls.DataGridItem 215 0
LineItems:DataGridItems:_ctl2:_ctl0 System.Web.UI.WebControls.TableCell 18 0

-- Broken control tree.. Naming container should be control name Lineitems!
not 4..
4 ASP.WorkLineItems_ascx 3724 44
4:_ctl0 System.Web.UI.LiteralControl 67 0
4:DataGridItems System.Web.UI.WebControls.DataGrid 3482 188
4:DataGridItems:_ctl0 System.Web.UI.WebControls.DataGridTable 3482 0
4:DataGridItems:_ctl1 System.Web.UI.WebControls.DataGridItem 0 0
4:DataGridItems:_ctl1:_ctl1 System.Web.UI.WebControls.TableCell 0 0
4:DataGridItems:_ctl1:_ctl0 System.Web.UI.WebControls.Label 0 0
4:DataGridItems:_ctl2 System.Web.UI.WebControls.DataGridItem 215 0
4:DataGridItems:_ctl2:_ctl0 System.Web.UI.WebControls.TableCell 18 0
4:DataGridItems:_ctl2:_ctl1 System.Web.UI.WebControls.TableCell 15 0
4:DataGridItems:_ctl2:_ctl2 System.Web.UI.WebControls.TableCell 20 0
4:DataGridItems:_ctl2:_ctl3 System.Web.UI.WebControls.TableCell 19 0
4:DataGridItems:_ctl2:_ctl4 System.Web.UI.WebControls.TableCell 12 0
4:DataGridItems:_ctl2:_ctl5 System.Web.UI.WebControls.TableCell 19 0
4:DataGridItems:_ctl2:_ctl6 System.Web.UI.WebControls.TableCell 17 0

This corruption occurs after handling a datagrid event, sometimes edit,
sometime cancel..
Hitting the command button twice seems to fix the naming problem..

What causes the naming to change and not match the control naming container
(as above), it looks like it has lost the name and is using the
"sequentional" number as the control name..

Anyone know what can cause the naming container to change or any of the
above..

Thanks..
 
F

Felix Wu [MSFT]

Hi Cmoore,

Is it possible for you to create a demo that can reproduce the behaivor?
Without this information, it's pretty hard to dig into the problem. You can
send the samle to me, and I am glad to take a look into it. To get my
email, just remove "online" from my displayed email.

Thanks,

Felix Wu
=======
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top