It looks as if eventargs._props[1] = 0; works in FireFox4 but does not work in IE8. Any help would be appreciated. Thanks!
Hello jdymond,
I have asked our engineering staff to examine the issue with the misbehavior of the ItemClick events.
I will send you more information regarding this through your support ticket with number: CAS-69118-7VWNYM.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Ok Thanks for your help. I have pieced everything together and have figured this out flawlessly. Here are the steps...
1. Set the AutoPostBackFlags to ItemClick "Off" and ItemSelected "Off"
2. Add 4 ClientSide Events. ItemExpanding. ItemCollapsing, ItemExpanded, and ItemSelected.
Note: ItemExpanding and ItemCollapsing will call the same function.
3. The ItemExpanding and ItemCollapsing function will have the following JavaScript which will cancel the PostBack on a Header/Group Click.
eventArgs._props[1] = 0;
4. The ItemSelected function will have the following JavaScript which will cause a PostBack on a Child Item Click.
var id = sender._id;
if (!sender.get_selectedItem().hasChildren()) { __doPostBack(id, 0); }
Note: You will add any ServerSide code from the Child Click in the WebExplorerBar's ItemSelected Handler.
5. The ItemExpanded ClientSide Event you can add any code to collapse anoy other open menus and the like.
Hope this helps everyone else out! :)
I tried out what you described and indeed it fires a postback regardless if you set all the Auto Post back flags to false. This seem like a misbehavior and I will report it to the development team.
In the meantime try using the ItemSelected server side event instead of the ItemClicked. It doesn’t trigger an auto postback.
As for your previous question you can just get the sender’s id like this:
And do the post back for the child items like this:
__doPostBack(id, 0);
If you have further questions don't hesitate to ask.
Also note that when you fire off anything using the ItemClick event, it seems to force a PostBack regardless of the __doPostBack('WebExplorerBar1\',\'\')', 0); and overrides the ItemExpanding event which cancels the PostBack when clicking on the header eventArgs._props[1] = 0;
The whole concept is simple. A page has 2 WebExploerBars on it. If you click the Header of any of the WebExplorerBars, a PostBack should NOT occur. Once expanded, If you click on any child item, a PostBack should occur. Also, if another WebExplorerBar is already expanded, it should be colapsed.
Thanks Maya, This looks promising. However, how can we get the WebExplorerBar name without hardcoding it? We have several WebExplorerBar's on the page. Thanks!