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. Image for the cookie policy date
close icon

Integrate Drop Down List in Spread Sheet

Hello,

My Requirement are using Sync fusion Spread Sheet integrate drop down list on first row ,if possible then suggest please.

Thanks

1 Reply

SI Silambarasan I Syncfusion Team January 11, 2017 07:29 AM UTC

Hi Kuldeep, 
 
Thank you for using Syncfusion products. 
 
We have checked your requirement “To integrate DropDownList on First Row in Spreadsheet” and it has been achieved by using ‘cellTypes’ API or ‘addCellTypes()’ client-side methods.  Please refer the following code example. 
 
 
<div id="Spreadsheet"></div> 
 
var dataSource = [...]; 
$(function () { 
    $("#Spreadsheet").ejSpreadsheet({ 
        sheets: [{ 
            rangeSettings: [{ dataSource: dataSource, startCell: "A3" }], 
            cellTypes: [                         
                { 'range': 'A1', 'settings': { 'type': ej.Spreadsheet.CustomCellType.DropDownList, 'dataSourceRange': 'A3:A11' } } 
            ] 
        }], 
        loadComplete: "onLoadComplete" 
    }); 
}); 
 
function onLoadComplete(args) { 
    if (!this.isImport) { 
        //... 
 
        //using Client-side method to add dropdownlist 
        //this.XLCellType.addCellTypes("A1", { 'type': ej.Spreadsheet.CustomCellType.DropDownList, 'dataSourceRange': 'A3:A11' }); 
    } 
} 
 
 
 
For your convenience, we have prepared a sample to demonstrate this in JS Playground.  Please refer the below sample link,  
 
For more information, please refer the below online help documentation & sample links about cell types data representation in Spreadsheet. 
 
 
Regards, 
Silambarasan I 


Loader.
Live Chat Icon For mobile
Up arrow icon