Welcome Guest Search | Active Topics | Sign In | Register

TreeView does not fire all events Options
Peter B
Posted: Wednesday, August 5, 2009 7:53:44 AM
Rank: Advanced Member
Groups: Member

Joined: 8/2/2009
Posts: 39
Hi all,
I have a treeview which is completely loaded by code. My problem is, that only one of three events is fireing.

ItemClick - no response
ItemMoved - no response
ItemPopulage - correct !!

AllowDragDrop is set to true, all other properties are default.
The treeview is simply placed in a aspx page, no callback panel.
(Visual Studio 2009, C#, eo 7.0)

Do i miss something?

Thank you for your help
eo_support
Posted: Wednesday, August 5, 2009 8:55:13 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi,

For ItemClick event to fire, you must have RaisesServerEvent set to true.

For ItemMoved event to fire, the page must post back (for example, by a button). This is similar to the TextBox's TextChanged event. It is fired when you type in the text box, it is fired when you submit the page. ItemMoved event is the same. It is not fired when you move the node. It is fired the page posts back.

Hope this helps.

Thanks!
Peter B
Posted: Wednesday, August 5, 2009 5:03:03 PM
Rank: Advanced Member
Groups: Member

Joined: 8/2/2009
Posts: 39
Hi,

Thanks to your quick reply, my code is now working!

BTW I don't understand how the button event routine for postback in the code-behind page can be found/executed without a onClick= reference on the button-side.

Thank you
Peter
eo_support
Posted: Wednesday, August 5, 2009 5:25:07 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Peter B wrote:
BTW I don't understand how the button event routine for postback in the code-behind page can be found/executed without a onClick= reference on the button-side.


Hi,

I am not sure whether you are asking about a regular ASP.NET button or not. We do not provide tech support on general ASP.NET questions. Sorry about that!

Thanks!
Peter B
Posted: Thursday, August 6, 2009 12:20:40 PM
Rank: Advanced Member
Groups: Member

Joined: 8/2/2009
Posts: 39
Hi,
No, I am asking about the (ASP.NET) button inside of the callback panel, which is responsible for postbacking/updating the treeview.

(BTW I don't understand how the button event routine for postback in the code-behind page can be found/executed without a onClick= reference on the button-side.)

tnx
Peter
eo_support
Posted: Thursday, August 6, 2009 12:30:29 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Peter B wrote:
No, I am asking about the (ASP.NET) button inside of the callback panel


Hi,

They are unrelated. The CallbackPanel does not care how and whether the button fires an event. If the button is a trigger (either directly or indirectly) tries to post back the page (posting back page does not necessarily fires any event), then the CallbackPanel will catch it and convert the post back to a callback. Whatever action the button would perform when it gets back to the server side is still completely up to the button.

Thanks!
Peter B
Posted: Thursday, August 6, 2009 1:42:33 PM
Rank: Advanced Member
Groups: Member

Joined: 8/2/2009
Posts: 39
Thanks for this very useful information.

All the best
Peter


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.