Telerik Forums
Kendo UI for jQuery Forum
1 answer
41 views

Hi!

I'm using a Grid with a key-based field  with a large list of values.
It works Ok, but when i want to filter by this field, (multi filter) appears hundreds of possible values.

¿Can I reduce the filter values to only existing options in grid elements?

Here is the example:
https://dojo.telerik.com/@larras/atuFikoP

The filter for field country allows all possible values, buy I want to limit the filtering options to the two countries that appear in the grid.

I have tried to use a new reduced collection for values, but in this case, when I add a new row, the country column has not text value and shows the id number.

¿Is possible to change dinamically the "multi" filter collection of values?

Thanks  and greetings!

 
Martin
Telerik team
 answered on 21 Nov 2023
2 answers
34 views

Hi,

Need to understand how I can get the filter and search features for the Kendo grid to search for strings in child grid rows as well as the parent grid rows... right now if I use the Search window, or the Filter feature at the parent level, the Kendo grid will only search in the domain/area of the parent rows.

 

How can I include the child rows? This is problematic because, as I understand it the child rows are not loaded until the user clicks the left side triangle icon to open the child rows. Customer wants this.

My understanding is this would require all the child rows to rendered... then searched, and all rows with out the string or or substring would be filtered out?

Before I embark on manipulating the grid, wondered if there was a better solution or way to go about this?

Regards,

George

George
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 31 Oct 2023
1 answer
46 views

I have the following kendo grid configuration,

backend service response scheme is correct, but doesnt work the virtual filter. I can't do virtual scrolling

var gridDefinition = {
    model: {
        id: "Id",
        fields: {
            Id: { type: "string" },
            Customer: { type: "string", editable: false },
            //other fields...              
        }
    },
    columns:[
        {
            field: "Customer",
            title: JsonModel.Resources.SAPCustomer,
            filterable: {
                multi: true,
                search: true,
                itemTemplate: function (e) {
                    var customers = $scope.customers || []; 
                    var itemsHtml = "";

                    for (var i = 0; i < customers.length; i++) {
                        var customer = customers[i];
                        itemsHtml += "<li class='k-item'><label class='k-label'><input type='checkbox' name='" + e.field + "' value='" + customer.Id + "'/><span>" + (customer.Description || customer.all) + "</span></label></li>";                                
                    }
                    return itemsHtml;
                }, 
                height: 220,
                virtual: {
                    itemHeight: 26,
                },
                dataSource: {
                    transport: {
                        read: {
                            url: JsonModel.Urls.ListIndexFilterUnique2,
                            type: "POST",
                            dataType: "json",
                            data: function () {
                                return {
                                    ColumnFilter: 'Customer'
                                };
                            }
                        }
                    },
                    requestEnd: function (e) {
                        if (e.type == "read" && e.response) {
                            if ($scope.customers) {
                                $scope.customers = $scope.customers.concat(e.response.customer);
                            } else {
                                $scope.customers = e.response.customer;
                            }
                        }

                    },
                    schema: {
                        data: "model",
                        total: "Total",
                        model: {
                            data: {
                                Id: { type: "string" },
                                Description: { type: "string" }
                            }
                        }
                    },
                    pageSize: 10,
                    serverPaging: true,
                    serverFiltering: true
                },
            },
            headerAttributes: { "class": "kendoui-column-header" }
        },//other columns

                        
Martin
Telerik team
 answered on 25 Oct 2023
1 answer
178 views

Hi All,

My code creates a kendo grid.

When the filterable option is set to true, I see the built-in filter icon on the grid column header and that works fine.

If I set both the filterable:true and columnMenu:true, the filter icon disappears and I see only an icon for the column menu.

I found in the Kendo documentation the below.

When the columnMenu configuration is set to true, the Grid fires the columnMenuInit and columnMenuOpen events instead of filterMenuInit and filterMenuOpen.

Is there a way to have both the filter menu and column menu visible as shown below? Or at least some way when the user clicks on the filter icon to open the filter window? I want the user to be able to filter with one click, instead of clicking on the column menu and then clicking "Filter" to launch the filter screen.

Thank you in advance for any help!

 


Martin
Telerik team
 answered on 25 Oct 2023
1 answer
51 views

Hello!

Maybe it's a known thing, but I couldn't find a solution. In the grid, I display the data that comes from the server in Windows 1250 format. I display them correctly through the template. But the filtering doesn't work. If I enter a query with special characters, it does not return correct results. It even offers incorrect values (I am sending a picture). I need client side filtering.

 

Well thank you.

Georgi Denchev
Telerik team
 answered on 27 Sep 2023
0 answers
37 views

 

3 - have ability to make filter simpler(UI, remove group option)

the scenario - I want to have the filter be above the grid & be able to apply the filtering on the server to limit the result set, but at the same time, when the result set is limited give the user the ability to filter the grid on the client using grid row filter 

 

 

Aleksandr
Top achievements
Rank 1
Bronze
Bronze
Veteran
 updated question on 14 Sep 2023
1 answer
50 views

I have a kendo grid in JSTL format where I'm trying to override a filter choice for date (making the filter look for the span of an entire day like in this example. But setting a simple hardcoded filtergives no results in the kendo grid, even when there are results matching the filter:

let startOfFilterDate = new Date(2000,1,1,0,0,0) 
let endOfFilterDate = new Date(2000,1,1,23,59,59) 
var filter = { 
  logic: "and", 
  filters: [ 
    { field: "date", operator: "gte", value: startOfFilterDate }, 
    { field: "date", operator: "lte", value: endOfFilterDate } 
  ] 
}; 
e.sender.dataSource.filter(filter);

I've tried putting in various places...

1) <kendo:dataSource-change></kendo:dataSource-change

2) <kendo:grid name="search-result-grid" ... filterable="true" columnMenu="true" columnMenuInit="doFilter">

And then my "doFilter" method is pretty much the same as the given example linked to above.

If I console.log the dataSource.filter, it shows that the filters are there. But the datasource is not being updated/refreshed with the filter for whatever reason.

Georgi Denchev
Telerik team
 answered on 30 Aug 2023
1 answer
126 views

Hi, 

 

Would love to know how to hide cells based on the value OR order of rows.

 

Here is what I have coming in:

 

 

 

 

It is a merged cell by Staff Name.

 

Here is what I want initially when the grid is populated:

 

Then… If I click on the toggle button, or the row… this would work too it would  expand like this:

 

 

 

Trying to figure out how to filter off of the value TOTAL in the 5th column… then click a button on the 5th column (Pay Code) …and have it fully populated. The merge cell stuff I think I have got. Any idea how I could accomplish this?

 

 

 

Regards,

 George

Neli
Telerik team
 answered on 18 Aug 2023
1 answer
56 views

Given a filter control and associated grid:

Is there a way to catch the click event of the apply button?

So, I can format the cells in the resulting grid? I tried this code in the dojo with an alert ("...") and I couldn't see the alert popup on the click. I am assuming I have something really wrong here.

 

 

Nikolay
Telerik team
 answered on 01 Aug 2023
1 answer
50 views

Hi,

Thank you for your answer to my merged rows question previously. Now I have the problem of getting the grid contents to sustain the format if I use Filter, Clear buttons in the Filter pop up or Sort. Example:

 

After setting the filter say for "Equals"  John Smith I get:

Buuuut. I really want:

Is there a way to "bypass" or extend the function where I could use the same implementation to restructure the rows like the above.

javascript - Does Kendo Grid support cell merge or not? - Stack Overflow

I think maybe I could create a listener to catch the Filter/Clear/Sort command and capture the JavaScript array structure and implement a solution similar to the one in Stack Overflow where I loop though the array and merge the cells of the records when the text content is equal? Maybe I am imagining this?

Georgi Denchev
Telerik team
 answered on 28 Jul 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?