Under Review
Last Updated: 19 Jun 2020 13:24 by ADMIN
Naim
Created on: 05 Jun 2020 12:26
Type: Bug Report
1
Multiselect popup behaves inappropriate in custom parameter editor with "MultiValueEditor"
After selecting some elements in the popup of multiselect, the popup jumps to the top-left side corner of the window.
3 comments
ADMIN
Neli
Posted on: 19 Jun 2020 13:24

Hello Naim,

Thank you for the provided code.

I have tested it but I wasn't able to reproduce the described issue from your initial answer. Is it possible to give me more details about the scenario of the project and why do you need to override the editors? Note that one you do this, the logic behind is not controlled by us and only the custom code will be executed. If there is no special reason for using custom parameters, I would suggest keeping their default functionality.

I also need to know when do you expect to send the data from the multi select to the children.

In addition, it would help us if you can send us a sample project which is runnable and reproduces the problem. You can also test using combo box out-of-the-box:

.Parameters(new Parameters { Editors = new Editors { MultiSelect = EditorTypes.ComboBox} })
I will be looking forward to receiving an update from you.

Regards,
Neli
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Naim
Posted on: 12 Jun 2020 13:34

Hi Neli,

I am sending you a sample code but if you need additional information please let me know.

<div class="row">
    <div class="col-sm-12">
        @(Html.TelerikReporting().ReportViewer()
            .Id("Detail_Transaction_Report")
            .ServiceUrl(Url.Content("~/api/reports"))
            .TemplateUrl(Url.Content("~/ReportViewer/templates/telerikReportViewerTemplate-FA.html"))
            .ReportSource("Report_v01.trdp")
            .Parameters(new Parameters { Editors = new Editors { SingleSelect = EditorTypes.ComboBox, MultiSelect = EditorTypes.ComboBox } })
            .ParameterEditors(editor => editor.MultiValueEditor("multiValueEditor"))
            .ViewMode(ViewMode.Interactive)
            .ScaleMode(ScaleMode.FitPageWidth)
            .PersistSession(false)
            .PrintMode(PrintMode.AutoSelect)
            .EnableAccessibility(false)
        )
    </div>
</div>

<script>
    function multiValueEditor(placeholder, options) {
        var multiSelectElement = $(placeholder).html('<div></div>'),
            parameter,
            valueChangedCallback = options.parameterChanged;

        function onChange(e) {
            var val = e.sender.value();

            valueChangedCallback(parameter, val);
        }

        function onSelect(e) {
            // Additional code
        }

        return {
            beginEdit: function (param) {
                parameter = param;

                $(multiSelectElement).kendoMultiSelect({
                    dataTextField: 'name',
                    dataValueField: 'value',
                    value: parameter.value,
                    autoClose: false,
                    filter: 'contains',
                    dataSource: parameter.availableValues,
                    change: onChange,
                    select: onSelect
                });
            }
        };
    }
</script>

 

I want to let you know that this bug only happens if the "autoClose" option is set to false and when using cascading parameters like in this article https://docs.telerik.com/reporting/designing-reports-parameters-cascading-report-parameters.

Also what i noticed is that if i use multiselect this way(with the "MultiValueEditor") and if i select one of elements in the popup, it immediately sends the request to filter the cascading parameter without waiting for the popup to close. But if i don't use the parameter editor and when i select elements from popup it waits till the popup closes to send the request for filtering cascading parameter.

ADMIN
Neli
Posted on: 12 Jun 2020 06:29

Hi Naim,

I have tested to reproduce the issue but I wasn't able to. Is it possible to send us a sample runnable project on which the problem is reproducible, so we can investigate it on our end?

Regards,
Neli
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.