There's got to be a way to do this. How do you disable the postback on a WebDataMenu MenuItem? So if I just want a sub-menu item to have children but not have any functionality for itself.
Thanks
Hi,
if you have turned on postback using AutoPostBack flags, then postback is turned on per control basis. If you want to do a postback for specific item you have to configure a navigate URL that will post to your page.
Thanks,
Lubomir
Hello again Lubomir, I'm not sure I understand your answer... or maybe my question wasn't clear. As far as I can see there is no AutoPostBack property for any control in the WebDataMenu. Also, I'm not trying to postback, I'm trying to avoid a postback on any given node in the menu.
Assuming there is an AutoPostBack property that I didn't see, it would be set to true by default. If this is the case, how would I stop any node in the menu from posting back.
Thanks for your help.
if you have the following in the aspx:
<ig:WebDataMenu ID="WebDataMenu1" runat="server"> <AutoPostBackFlags ItemClick="On" /> ...
</ig:WebDataMenu>
then you have auto postback for ItemClick turned on. If you want to stop the postback for some item, you have to be subscribed for the client side javascript event ItemClick and inside it to say
eventArgs.set_cancel(true) ; this way you will cancel the click and no auto postback will happen for the desired item.
However, when you set the NavigateUrl Property on the DataMenuItem with the Target property set to _blank at the same time, the page will postback after opening the NavigateUrl i n a new browser window. This is annoying. How can I prevent the page from posting back in this case ? Cause, if i use the eventargs._setCancel(true) on the clicked item, it will not navigate. My Goal is to have a client´-side Navigation without posting back - I guess thats what a NavigatUrl property should be intended for.
Thanks a bunch Ludomir, that 's exactly what I was looking for. I now see the reason that I couldn't find the AutoPostBackFlag... I didn't have the latest service release installed.
Thank you for your help.