Completed
Last Updated: 06 May 2020 15:13 by ADMIN
Release R2 2020
FCosta
Created on: 27 Apr 2020 15:16
Category: Spreadsheet
Type: Bug Report
1
Cell formula "list" not working when there's more than one RadSpreadsheet on the page

Workaround: Placing the following script under the ScriptManager

<script>
        kendo.spreadsheet.registerEditor('_validation_list', function () {
            var context, list;
            function create() {
                var $list = $("[id$='SpreadsheetListBoxDropDown']").first();
                var element = $list.closest(".rssPopup");

                list = $find($list.attr("id"));
                if (!this._listdropdown) {
                    var dropdown = new kendo.spreadsheet.DropDown(element);
                    this._listdropdown = dropdown;

                    list.add_selectedIndexChanged(function (sender, args) {
                        dropdown.close();
                        var item = list.get_selectedItem();
                        if (item) {
                            context.callback(item.get_value());
                        }
                    });
                }

                this._listdropdown.openFor(context.view.element.find('.k-spreadsheet-editor-button'));
            }
            function open() {
                create();
                var matrix = context.validation.from.value;
                if (matrix) {

                    var items = list.get_items();
                    items.clear();
                    matrix.each(function (el) {
                        var item = new Telerik.Web.UI.RadListBoxItem();
                        item.set_text(el);
                        items.add(item);
                    });
                }
            }
            return {
                edit: function (options) {
                    context = options;
                    open();
                },
                icon: 'p-icon p-i-arrow-60-down'
            };
        });
    </script>

 

0 comments