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

Search Toolbar not working

3 Answers 559 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DevLop
Top achievements
Rank 1
DevLop asked on 04 Feb 2021, 07:33 AM

Hello,

I used Kendo Grid with the search toolbar on data from a service call. My data is displayed correctly and my select function works fine.

But when I try to search in toolbar, the results will not be filtered. Is this a problem with my service call?

    var settingsSelectable = "multiple, row";
    var settingsColSelectable = [
        {
            selectable: true,
            width: 75,
            attributes: {
                "class": "checkbox-align",
            },
            headerAttributes: {
                "class": "checkbox-align",
            }
        },
        {
            title: "Product Information",
            template: "<div>#: Name #</div><div>Id: #: Id # | ArtNo: #: ArtNo #</div>",
            attributes: {
                "class": "select-#: Id #",
            }
        }
    ];
     
var grid = $(".all-products").kendoGrid({
        dataSource: new kendo.data.DataSource({
            transport: {
                read: function (options) {
                    LoyaltyCategoryService.GetProducts().then((res) => {
                        options.success(res.data.Data);
                        preselect();
                    })
                }
            }
        }),
        toolbar: ["search"],
        columns: settingsColSelectable,
        height: 800,
        selectable: settingsSelectable,
        change: onChange,
        dataBound: function () {
            preselect();
        }
    });

 

Maybe someone can help me! Have a great day!

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 05 Feb 2021, 01:32 PM

Hi,

 

Thank you for writing to us.

Usually, this can happen if there is a hidden JavaScript error. Could you run your web site on Chrome, then enable the inspector with F12 and check the console whether there are any script errors?

If there are no errors, you can use the following live dojo as a base to modify it in order to demonstrate the issue you are facing and send the new updated URL back to us for further investigation:
https://dojo.telerik.com/uQAYUHIG

This will allow us to replicate the same problem on our side and consequently find a precise and accurate solution for resolving it.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
DevLop
Top achievements
Rank 1
answered on 05 Feb 2021, 02:39 PM

Hey! Thanks for your help. I invested too much time into this, so I decided to split my "Product Information" with the template into 3 seperate cols. Now it works perfectly. Maybe I cannot search within cols with template?

0
Eyup
Telerik team
answered on 09 Feb 2021, 09:53 AM

Hi,

 

I am glad that you've managed to find the solution.

And yes, in general, database operations like filtering, sorting, grouping, etc. do not care about the templates. They only got affected by the fields and raw data present in the data source of the grid.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
DevLop
Top achievements
Rank 1
Answers by
Eyup
Telerik team
DevLop
Top achievements
Rank 1
Share this question
or