3 Answers, 1 is accepted
0
Hi Judd,
Yes, the Kendo Spreadsheet offers such functionality. Here you will find the Custom cell editors demo, where a drop-down is configured for the values in the B1 cell. Note, that Cell editor is specified using the cell validation:
Keep in mind, that the Cell editor could be configured per cell, as in the above example, or per range of cells, using the Spreadsheet.Range.validation() method.
Regards,
Veselin Tsvetanov
Progress Telerik
Yes, the Kendo Spreadsheet offers such functionality. Here you will find the Custom cell editors demo, where a drop-down is configured for the values in the B1 cell. Note, that Cell editor is specified using the cell validation:
cells: [
{ value:
"Select item:"
, bold:
true
},
{ background:
"#fef0cd"
,
validation: {
dataType:
"list"
,
showButton:
true
,
comparerType:
"list"
,
from:
'{ "Foo item 1", "Bar item 2", "Baz item 3" }'
,
allowNulls:
true
,
type:
"reject"
}
}
]
Keep in mind, that the Cell editor could be configured per cell, as in the above example, or per range of cells, using the Spreadsheet.Range.validation() method.
Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.
0

Dinesh
Top achievements
Rank 1
answered on 22 May 2019, 07:02 AM
By implementing the validation approach in cell the list will be shown, but what if we need to allow the user to enter any other values which are not in list.
So if list has A,B,C option, but user type D in cell it will gives validation issue. Can we allow user to enter anything in list option and cell should not be highlighted as validation. Is that possible Veselin?
0
Hi Dinesh,
You could change the validation type from reject to warning. That would allow the user to type custom input in the cells in question:
The above, however, will still display the validation warning triangle. If you need to avoid that, you should reset the validation configuration upon change. To do that you could use the Spreadsheet change event:
Here is a small sample implementing the above.
Regards,
Veselin Tsvetanov
Progress Telerik
You could change the validation type from reject to warning. That would allow the user to type custom input in the cells in question:
{ background:
"#fef0cd"
,
validation: {
dataType:
"list"
,
showButton:
true
,
comparerType:
"list"
,
from:
'"Foo item 1,Bar item 2,Baz item 3"'
,
allowNulls:
true
,
type:
"warning"
} }
The above, however, will still display the validation warning triangle. If you need to avoid that, you should reset the validation configuration upon change. To do that you could use the Spreadsheet change event:
change:
function
(e) {
var
range = e.range;
var
topLeft = range.topLeft();
if
(topLeft.row === 1 && topLeft.col === 1) {
var
validation = range.validation();
var
from = validation.from;
var
textOnly = from.substring(1, from.length -1);
var
array = textOnly.split(
','
);
var
value = range.value();
if
(array.indexOf(value) === -1) {
textOnly = textOnly +
','
+ value;
validation.from =
'"'
+ textOnly +
'"'
;
range.validation(validation);
}
}
},
Here is a small sample implementing the above.
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.
Nishant
commented on 17 Mar 2022, 12:05 PM
Top achievements
Rank 1
@Veselin Tsvetanov, Does same functionality can be implemented using Kendo React?? We'd need dropdowns list in columns for validations in excel using Kendo React UI.
Veselin Tsvetanov
commented on 21 Mar 2022, 07:00 AM
Telerik team
Yes, the Kendo React SPreadsheet component is actually a wrapper of the jQuery Spreadsheet. Hence, all features available in the jQuery Spreadsheet are also available in the React wrapper.
Manivanna
commented on 11 Aug 2023, 07:08 AM
Top achievements
Rank 1
@Veselin Tsvetanov, Is the cell validation feature not available in the newly released kendo-react-spreadsheet package. If yes, do you have an estimate that feature may be implemented?
Neli
commented on 15 Aug 2023, 06:46 AM
Telerik team
Hi Manivanna,
Regarding the Kendo React Spreadsheet, please post your question in the Kendo React forum:
- https://www.telerik.com/forums/kendo-ui-react
Regards,
Neli