|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
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!
|
|
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
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
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!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/2/2009 Posts: 39
|
Thanks for this very useful information.
All the best Peter
|
|