Hi,
i tried nearly everything but i dont find the way how to avoid postbacks on a click on unlinked menu items or parent items.
I will describe it on an example to make it clear. Look at this menustrukture:
Options
If the user press "Options" or "More" there should be no postback because their is no tag, no url and nothing else defined. So the page will reload and it will happen nothing.
How is it possible to disable this behavior? I tried to step though the show cases but i was not able to find the tag or trick to do so.
Thank you very much
Holger
Hello Holger,
Thanks for writing. I believe a couple of customers had a problem similar to what you describe here (or at least I hope so) - the solution I suggested worked fine in their scenarios, hopefully it will be useful for you as well.
Please, follow the following forum thread of implementation details and let me know if this is helpful:
WebMenu - Stopping the click on clientside (NA-7.3)
Thank you! Though your hint i found another how to that matches the problem.. It checks if a menu entry has a child and aborts the postback if a child has been found.
http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=8625
function itemClickHandler(menuID, itemID) { var item = igmenu_getItemById(itemID); var menu = igmenu_getMenuById(menuID); var child = item.getFirstChild(); if (child != null) { menu.NeedPostBack = false; menu.CancelPostBack = true; } else { menu.NeedPostBack = true; menu.CancelPostBack = false; } }
yes i will try this. I really thing infragistics is the best out there. The only big issue is to find the information you are looking for. There are tons of forums, devcenters, howtos and examples.. But hell, the easiest way is to google and it looks like the pages are not parsed that good.. You mostly get results from other newsgroups or spamed forums...
But anyways.. I think a AllowPostback Property of menu items would rock.. ;P
ty, Holger
Cool - looks great. I totally forgot to check out the DevCenter - it really has a lot of hidden gems that match a lot of common scenarios.
Thanks for sharing the solution in forums - this will surely be helpful for other developers.