PivotTable ButtonMenuClick Event

N

ngarsi

Hi,

I have embedded the pivot table object in a web page and I am trying to
extend the toolbar of the pivottable. Which I have been able to do using (in
javascript):

buttonSave = toolbar.Buttons.Add(1, "save", "", iTBR_MENUBUTTON_c, "save1");
btnSave2 = buttonSave.ButtonMenus.Add(1, "save11", "Save");
btnSave3 = buttonSave.ButtonMenus.Add(2, "save12", "Save As");

Which creates a new button with a sub menu.

I can also trap the click event of the buttons by using the CommandExecute
event of the pivot table.

The problem I am having is that the sub menus do not fire the CommandExecute
event, they fire the ButtonMenuClick event of the toolbar object within the
pivot table and I cannot find a way to trap this event.

Any help would be appreciated.

Neil.
 
W

Wei-Dong XU [MS]

Hi,

Thanks for the posting!

For your requirement on the ButtonMenuClick event, since Toolbar is the
inner componenet used inside the pivottable, this is really not easy for
the script code to handle it because that Script code doesnot have the
method to add the event handler directly. Since Pivottable doesnot provide
the event for the ButtonMenuClick, we cannot handle that event.

So as I know regarding this issue, if we are going to handle the menu
button, the best method is to add normal html button in the page and then
provide the javascript code to handle the button click event. I'd suggest
please use this method which is also used by Office XP web component tool
pack.

Please feel free to let me know if you have any further question on this
issue.

Have a nice day!

Best Regards,
Wei-Dong Xu
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
<https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469>

Others: <https://partner.microsoft.com/US/technicalsupport/supportoverview/>
If you are outside the United States, please visit our International
Support page:
<http://support.microsoft.com/default.aspx?scid=/international.aspx>.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
N

ngarsi

Thats the conclusion I came to, but hoped there was something clever I could
do to get around it. I'll do it a different way then.

Thanks for your help.
 
W

Wei-Dong XU [MS]

You are very welcome! :)

Have a nice day!

Best Regards,
Wei-Dong Xu
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a week to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
<https://partner.microsoft.com/US/technicalsupport/supportoverview/40010469>

Others: <https://partner.microsoft.com/US/technicalsupport/supportoverview/>
If you are outside the United States, please visit our International
Support page:
<http://support.microsoft.com/default.aspx?scid=/international.aspx>.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top