We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Custom Ribbon Tab in Spreadsheet

Thread ID:

Created:

Updated:

Platform:

Replies:

133003 Oct 3,2017 11:46 AM Oct 4,2017 03:29 AM ASP.NET MVC 1
loading
Tags: Spreadsheet
Landy
Asked On October 3, 2017 11:46 AM

I cannot not find any doucmentation on creating a custom Ribbon Tab in Asp.Net MVC Spreadsheet. Is it possible?


Shanmugaraja K [Syncfusion]
Replied On October 4, 2017 03:29 AM

Hi LANDRUM, 
 
Thanks for using Syncfusion products, 
 
We would like to let you know that we can achieve your requirement by using addTab client method. Please refer the below code example, 
 
[CSHTML] 
 
 
    <div class="control"> 
        @(Html.EJ().Spreadsheet<object>("Spreadsheet") 
      .ClientSideEvents(events => events.LoadComplete("loadComplete")) 
        ) 
    </div> 
    <div class="clear-fix"></div> 
    <script type="text/javascript"> 
        function loadComplete(args) { 
            var tabGroup = [{ 
                alignType: ej.Ribbon.AlignType.Rows, text: "Custom Tab Group", content: 
                [{ 
                    groups: [{ 
                        id: "new", text: "Custom", toolTip: "Cut", 
                        buttonSettings: { 
                            contentType: ej.ContentType.TextAndImage, 
                            imagePosition: ej.ImagePosition.ImageTop, 
                            prefixIcon: "e-icon e-ssr-cut", 
                            click: "executeAction" 
                        } 
                    }],  
              defaults: { type: ej.Ribbon.Type.Button, width: 60, height: 70    } 
                }] 
            }]; 
            xlObj.XLRibbon.addTab("Custom Tab", tabGroup, 2); // To add the tab in the ribbon. 
        } 
    </script> 
 
 
We have created MVC sample with these code examples and the same can be downloaded from the below location. 
 
 
Regards, 
Shanmugaraja K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;