Hi!
I have a problem with events not triggered the second time in RadOrgChart.
In my project I need both to add and remove nodes. Adding nodes works really nice with the drag and drop functionality, but removing is more complicated. To solve this I added an asp:Button inside the ItemTemplate that fires the event of removing a node. This works fine when removing one node. But when I try to remove the next node the event will never get fired - what happens is that I get a postback (because of the button) but it never triggers the event. On the other hand, if I again try to press the button, the event will be called. I am working with dynamically created data so to be certain that the behaviour is not depending on this I tried changing the RadOrgChart to an asp:Repeater to test the behaviour, but this case proved to work - the remove event was called every time when using the Repeater. This leads me to believe there is some sort of bug with RadOrgChart. To be perfectly clear about what I did, I'll give you the aspx code and the situation step by step:
1. Page is loaded. I press the button of one of the nodes and the delete event is called, which removes this node.
2. I press the button of another node (because my first node is deleted) and I get a postback, but the event is not fired.
3. I press the button of the same node as (2) and I get a postback AND the event gets called.
Is this a know bug or what could I do to trigger the event? (I could of course do a Response.Redirect() in my event to the same page but that is a nasty solution)
Thanks for helping!
I have a problem with events not triggered the second time in RadOrgChart.
In my project I need both to add and remove nodes. Adding nodes works really nice with the drag and drop functionality, but removing is more complicated. To solve this I added an asp:Button inside the ItemTemplate that fires the event of removing a node. This works fine when removing one node. But when I try to remove the next node the event will never get fired - what happens is that I get a postback (because of the button) but it never triggers the event. On the other hand, if I again try to press the button, the event will be called. I am working with dynamically created data so to be certain that the behaviour is not depending on this I tried changing the RadOrgChart to an asp:Repeater to test the behaviour, but this case proved to work - the remove event was called every time when using the Repeater. This leads me to believe there is some sort of bug with RadOrgChart. To be perfectly clear about what I did, I'll give you the aspx code and the situation step by step:
1. Page is loaded. I press the button of one of the nodes and the delete event is called, which removes this node.
2. I press the button of another node (because my first node is deleted) and I get a postback, but the event is not fired.
3. I press the button of the same node as (2) and I get a postback AND the event gets called.
<
telerik:RadOrgChart
runat
=
"server"
ID
=
"RadOrgChart1"
DataTextField
=
"Name"
DataFieldID
=
"ID"
DataFieldParentID
=
"ParentID"
>
<
ItemTemplate
>
<
asp:Button
runat
=
"server"
ID
=
"ButtonRemoveBox"
OnClick
=
"ButtonRemoveBox_Click"
/>
</
ItemTemplate
>
</
telerik:RadOrgChart
>
Is this a know bug or what could I do to trigger the event? (I could of course do a Response.Redirect() in my event to the same page but that is a nasty solution)
Thanks for helping!