This is a migrated thread and some comments may be shown as answers.

Custom cell editor on spreadsheet when using MVC wrappers

2 Answers 105 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 27 Sep 2018, 01:20 PM

Hi,

I'm using the Telerik spreadsheet with the MVC wrappers and am trying to add a custom cell editor, (actually an auto complete) but similar to the custom color editor shown in the third example on the Kendo UI demos https://demos.telerik.com/kendo-ui/spreadsheet/custom-editors. However this example is missing from the MVC demos https://demos.telerik.com/aspnet-mvc/spreadsheet/custom-editors and there is no Editor method on the SpreadsheetSheetRowCellBuilder object.

This example https://docs.telerik.com/kendo-ui/knowledge-base/spreadsheet-open-autocomplete-editor-on-cell-click suggests a way that I could use the Select event to achieve the editor in a popup but I would like to add it in cell. 

I realize this won't be available out of the box with the MVC wrappers, but would be very grateful if you could suggest how I might create a workaround for it. 

Regards

Michael

 

 

2 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 01 Oct 2018, 10:47 AM
Hello Michael,

Attached you will find a simple MVC project implementing a custom AutoCoplete editor for the B1 cell on the Spreadsheet sheet. As you have noticed, the Editor() method is not available in the SpreadsheetSheetRowCellBuilder. That is why, the custom editor is configured for the cell using the Range.editor() method:
var spread = $('#spread').getKendoSpreadsheet();
var sheet = spread.activeSheet();
var cell = sheet.range("B1");
 
cell.editor('autoCopmlete');

The example demonstrates how to add a custom editor button, which will open the AutoComplete in a modal pop-up. Keep in mind that the AutoComplete could not be embedded in the Spreadsheet cell itself.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Michael
Top achievements
Rank 1
answered on 02 Oct 2018, 10:30 AM

Thanks very much for your response Veselin and for taking the time to put together an example project. I've been able to get this working and I think the popup option will be acceptable for the user. 

Regards

Michael

 

 

Tags
Spreadsheet
Asked by
Michael
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Michael
Top achievements
Rank 1
Share this question
or