Error when try to add the dropdownlist with custom datasource in Spreadsheet

TypeError: Cannot read property '0' of undefined
    at t.spreadsheetFeatures.cellType._renderControls (ej.web.all.min.js:10)
    at t.spreadsheetFeatures.cellType._rangeCellTypes (ej.web.all.min.js:10)
    at t.spreadsheetFeatures.cellType.addCellTypes (ej.web.all.min.js:10)

Html:


Code:
var customList = [{ id: "1", text: "OPTION1" }, { id: "2", text: "OPTION2" }, { id: "3", text: "OPTION3" }, { id: "4", text: "OPTION4" }];
var excelObj = $("#Spreadsheet").data("ejSpreadsheet");

// To add the dropdownlist with custom datasource in Spreadsheet.
excelObj.XLCellType.addCellTypes("E1", { 'type': ej.Spreadsheet.CustomCellType.DropDownList, 'dataSource': customList, 'field': "text" });

Syncfusion versions:
http://cdn.syncfusion.com/14.3.0.49/js/web/ej.web.all.min.js
http://cdn.syncfusion.com/14.3.0.49/js/common/ej.widget.angular.min.js
   
   

8 Replies

SD Saranya Dhayalan Syncfusion Team March 11, 2020 09:08 AM UTC

Hi Josue 
 
Thank you for contacting Syncfusion support 
 
We would like to let you know that, we have done more feature improvements and issue fixes from your current version (14.3.0.49) to latest version (17.4.0.46) since its old version. So, we suggest you upgrade to the latest scripts and styles. Please find the latest scripts and style. 
 
  <link rel="stylesheet" rel='nofollow' href="https://cdn.syncfusion.com/17.4.0.46/js/web/flat-azure/ej.web.all.min.css" /> 
    
      <script src="https://cdn.syncfusion.com/17.4.0.46/js/web/ej.web.all.min.js" type="text/javascript"></script> 
 
 
For your convenience we have prepared a sample in latest version. Please find the below sample link  
 
 
Please check the above sample get back to us if you faced any issues. 
 
Regards, 
Saranya D 



UN Unknown Syncfusion Team April 20, 2020 03:11 PM UTC

Thank you, I did that and working fine... but when I select one option from the drop down I get an empty cell, I mean the value is retained but is not showing in the current cell.

Do you know which could be the issue?


SD Saranya Dhayalan Syncfusion Team April 21, 2020 10:36 AM UTC

Hi Josue, 
 
Most welcome. 
 
We have checked your reported issue, we are not able to reproduce it in our end in the 18.1.0.44 version. Dropdown value updated properly in the spreadsheet cell. Please find the below sample link: 
 
 
We have created the video for value. Please find the below link 
 
 
Please check the above sample and if still issue persist please reproduce your reported issue in the above sample and get back to us if you need further assistance on this. 
 
Regards, 
Saranya D 



UN Unknown Syncfusion Team April 21, 2020 06:17 PM UTC

I found the issue, I had another css file that re-wrote the styles.

Thanks soo much!


SD Saranya Dhayalan Syncfusion Team April 22, 2020 05:46 AM UTC

Hi Josue, 
 
Most welcome… 
 
We are happy to hear that your issue has been resolved. Please feel free to contact us if you need any further assistance on this. 
  
Regards, 
Saranya D 



UN Unknown Syncfusion Team April 22, 2020 10:24 PM UTC

Hi, sorry again,
I have other issue.

Why when I select one value in the drop down and after that I perform scroll in the spreadsheet the selected value is erase?


UN Unknown Syncfusion Team April 23, 2020 04:51 AM UTC

Also when I try to create drop doowns in the firsts 500 rows, just the 84 rows are created, example:

cellTypes: [
                            { 'range': 'C2:C500', 'settings': { 'type': ej.Spreadsheet.CustomCellType.DropDownList, 'dataSource': customList, 'field': "text" } }
                        ]


I don't know why this behavior. You know?


SD Saranya Dhayalan Syncfusion Team April 23, 2020 03:17 PM UTC

Hi Josue,  
 
Query: Why when I select one value in the drop down and after that I perform scroll in the spreadsheet the selected value is erase? 
Query: Also when I try to create drop doowns in the firsts 500 rows, just the 84 rows are created, example: 
 
We have checked your reported issue, when I select the value in the dropdownlist after that scrolling in the spreadsheet the selected value maintained properly.  
 
Also when I created the dropdownlist for 500 rows. Dropdownlist rendered properly in 500 rows. Please find the below sample link 
 
 
Before that we would like to let you know the following details to proceed further. 
 
1.       If possible, please reproduce your issue in the above sample. 
2.       Please provide your version details. 
3.       Please share us the video demonstration of this issue. 
 
Could you please provide the above requested information, based on that we will check and provide you a better solution quickly. 
 
Regards, 
Saranya D 


Loader.
Up arrow icon