Kendo UI - Filter Resources in Scheduler - kendo-ui

I want to dynamically filter resources in Scheduler and show resource and events based on the filter. Please see below demo project which I created.
As per my requirement I want to show only attendees: 1 and his event in Scheduler when I clicked on filter button.

It looks like you are not applying the filtering on the datasource correctly.
Try this line
schedulerTimeLine.dataSource.filter(filter);
instead of this one:
schedulerTimeLine.resources[0].dataSource.filter(filter);
Update:
After clearing up your requirements i think what you need is already present in your demo. You only need to put up proper attendee value in the filter to achieve the desired effect, i.e:
var filter = {
logic: "or",
filters:[
{field:"value", operator:"eq",value:1}
]
};
This filter will display only attendee with id 1name Alex.

Related

Is there any way to add custom filter function to PrimeNg dropdown with a search filter bar?

I am new to PrimeNg and I wish to use PrimeNg dropdown and customize its filter function. The filter search bar is from [filter]="true" and the default filter function is from filterMatchMode which is getting all the data from the api first then only filter the data but now I wish to filter the data from backend first then only use api to get the filtered result to frontend only to minimize the compile time. I had tried to use p-template to customize the search bar and dropdown, but it will appear a list of search bars since there has only selectedItem and item template to use. Is there any way on this? Thank you in advance.

Radzen DataGrid Custom Filtering

I am moving to Blazor and attempting to work out how to use custom filtering in Radzen's DataGrid. Here is an example of what I am looking to do (from the old app I need to migrate):
As you can see, there is a filtering section above the grid. Of course I know that Radzen has built-in filtering in the grid itself, but that doesn't help when the filter you want to apply is to a column that is not visible on the grid..
So basically: how do you filter on columns that are not in the grid? I am using OData.. if there is a way I can modify the OData filter when the search button is clicked and reload the grid, that would be helpful.
Sorry if I misunderstood you. As you said, when search button clicked you can load data from the DB by using oData filter and reload the Radzen data grid.
then just call StateHasChanged();
I worked out a solution. You can see it here: https://forum.radzen.com/t/radzen-datagrid-custom-filtering/9448/12
Basically I copied their code from /Radzen.Blazor/QueryableExtension.cs and modified the ToODataFilterString() method to use a collection of FilterDescriptor instead of RadzenGridColumn<T>.. As the name implies, it returns an OData query string.. which I use to filter the grid's data. A working example, with full source code can be found here: https://github.com/gordon-matt/Extenso/tree/develop/Demos/Demo.Extenso.AspNetCore.Blazor.OData

Action filters across dashboards without switching sheets in Tableau 9.2

In Tableau 9.2, how can I use a filter which filters from one dashboard to another so that when I trigger it, it does not switch dashboards? I have found this answer online, yet the poster cautions that their method should only be used for V7 and not V9.
Create another action as a filter in the sheet you want to stay in and select all of the dashboards as source and target. As this is the newest action it should make you stay in the same sheet while you keep applying different filters to your data.
In the Dashboard Menu go to Actions and add a Filter,in the filter select source dashboard and select other dashboard as target.This will redirect you to different tab.
You could use a parameter along with calculated fields, or use the JavaScript API
Filter actions also change to the target sheet or dashboard, if not already in focus (as you found out)
If you are doing single selection and your list of values is relatively stable, you could use a parameter instead -- loading the initial values from your field. And then define calculated fields that access the parameter value and use those fields on filter shelves as desired.
Changing a parameter value does not change the view to a target sheet -- unlike a filter action.
The downside of this approach is that the parameter values are not loaded dynamically from a data source and that parameters can only have a single value.
Another option could be to use the JavaScript API in some way. You could listen for changes to the selection, and take whatever action you want in response. That only works if you publish to Tableau Server, and you may want to then pull out some of the navigation controls into your own HTML/CSS -- say to filter the second dashboard just before switching to it.

Kendo Grid - Customize Filter Row

there is a feature called "Filter Row" in Kendo Grid
http://demos.telerik.com/kendo-ui/grid/filter-row
I want to add a drop-down list instead of a text box or a number box, to the filter box. It's for filtering a column that has countries. So I want list of countries in a drop-down list. How can I do this?
It's very similar to the custom Filter Menu (http://demos.telerik.com/kendo-ui/grid/filter-menu-customization). I made the mistake of no using valuePrimitive: true. You might not want it in your situation but keep that in mind.
Here's a sample: http://dojo.telerik.com/OKaS
Also, the filter menu should take up the editor model of the column but it's not always what you want.
Edit
Starting from 2014 Q2 SP1, the template function now receives an object containing "datasource" and "element". In my example, you would have to change the dropdown initialization from "container.kendoDropDownList" to "container.element.kendoDropDownList". The datasource is empty in my example but I'm assuming this can be used to pass the choices to a control without requiring another datasource or to externalize your current. I have not experimented with this feature but I suggest you do before taking my sample blindly.
As Pluc mentioned earlier valuePrimitive: true will help you create a custom filter for your grid/columns to send id's to your controller, if you are not using setting this property true you will receive an Object in your controller instead of a number, the conversion will not be made automatically . This is still working as of 2019

How can I programmatically do a search on a jqgrid without using their built in toolbar

I need to perform a search action on a jqgrid that has local data but the values for the query would be coming from another ui element in our application not the jqgrid toolbar's search dialog nor header filter ux.
I looked at the api and did not see any way to hook into the search/filter action programmatically. Is there a way to do this? I found some info on search templates for predefined searchs is there a way to run a search template from the grid api so it performs the filter.
What you need to do is just to add in the postData the searching filter (filters for example) and set search parameter of jqGrid. Then you can reload the grid. As the results the user will see the filtered grid.
Look at the old answer. I hope you will find all what you need here.

Resources