Multiselect in Kendo Jquery Spreadsheet

2 Answers 229 Views
MultiSelect Spreadsheet
Ian
Top achievements
Rank 1
Iron
Ian asked on 01 Nov 2022, 08:55 AM

Hi,

I have a requirement for a multi-select drop down within each cell of a specific column within a Kendo spreadsheet control.

Is this possible? I can't find any documentation around this. I would be really appreciative if someone could help me with code samples/demos

Thanks

Ian

2 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 04 Nov 2022, 07:38 AM

Hi Ian,

I would suggest taking a look at the Knowledge Base article linked below that demonstrates how a custom editor can be configured in Spreadsheet.

https://docs.telerik.com/kendo-ui/controls/data-management/spreadsheet/custom-editors

Once, the custom editor is defined, you can apply it to a range of cells, using the range method. 

var spreadsheet = $("#spreadsheet").data('kendoSpreadsheet')
var sheet = spreadsheet.activeSheet();
sheet.range("B1:B200").background('#fef0cd').editor("dropdownlist");

Here you will find a Dojo example where a custom editor is added for the second column.

I hope this helps.

Regards,
Neli
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Ian
Top achievements
Rank 1
Iron
commented on 04 Nov 2022, 08:38 AM

Thanks Neli, I will take a look

Ian

0
Ian
Top achievements
Rank 1
Iron
answered on 07 Nov 2022, 08:52 AM

Hi Neli,

Thanks for your reply, I was hoping to use a solution that keeps the dropdown in the spreadsheet cell, like the 'list' validation that I currently have in place.

Is there a way to use the multiselect instead of a list? Once the values are selected they appear in the spreadsheet cell like they look in a multi-select

I have looked at the cell validation documentation and I can see that I can use a 'custom' datatype,

how can I make this work with a multi select dropdown?

 

var range = spreadsheet.activeSheet().range("1:1"); range.enable(false); var columnSens = spreadsheet.activeSheet().range("C2:C30"); columnSens.validation({ dataType: "list", from: "ListValues!A$1:B$1", allowNulls: true, type: "reject", titleTemplate: "Value Invalid", messageTemplate: "Valid Values: 'true' or 'false'." });

Neli
Telerik team
commented on 09 Nov 2022, 08:25 AM

Hi Ian,

I am afraid that currently configuring MultiSelect through the Range validation is not supported.  If you need to have MultiSelect in the Spreadsheet cells you will have to use the approach with the custom editor described in the previous reply.

If you think that such an enhancement would be a valuable addition to the suite, you can submit a new Feature Request in our official Feedback Portal where new ideas are constantly being evaluated and the most popular ones are implemented in future releases:

https://feedback.telerik.com/kendo-jquery-ui

Regards,

Neli

Tags
MultiSelect Spreadsheet
Asked by
Ian
Top achievements
Rank 1
Iron
Answers by
Neli
Telerik team
Ian
Top achievements
Rank 1
Iron
Share this question
or