Telerik Forums
Kendo UI for jQuery Forum
7 answers
816 views

Hello,

I have a scheduler with context menu, which is displayed on mouse right click.

I have a problem with this scenario:

1. I select some slot in the scheduler by left mouse button.

2. I scroll the scheduler till the selected slot goes out of the current viewport and is not visible.

3. I right click some other slot.

Now I would like the slot where I right-clicked to be selected. Instead of this, the scheduler is automatically scrolled to display the previously selected slot and some other (totally different) slot is selected.

Is it possible to select a slot by right-click and to get rid of this automatic scrolling?

 

Boris

Dimitar
Telerik team
 answered on 22 Mar 2019
2 answers
10.1K+ views
I added a custom button to my grid to clear any currently active filters.  It's mostly working, but I am having a problem getting the filtermenu control to completely clear.  With the code below the actual data in the grid is unfiltered and the first item in each filtermenu is cleared.  The problem is that if you add an "and" or "or" condition to the filtermenu, the second condition is not cleared.  Any ideas as to how to properly do this?  Or is it possible to get a "clearAllFilters" method on the grid at some point in the future?  Thanks for your help.

$(".k-grid-clearfilters").click(function() {
    // Clear the grid filters
    var gridDataSource = $("#departmentgrid").data("kendoGrid").dataSource;
    for (var i = 0; i < gridDataSource.options.fields.length - 1; i++) {
        gridDataSource.filter({ field: gridDataSource.options.fields[i].field, value: "" });
    }
    gridDataSource.filter([]);
});


Regards,
Brian
n/a
Top achievements
Rank 1
 answered on 22 Mar 2019
2 answers
759 views

I have a kendo tree in a dialog box (https://demos.telerik.com/kendo-ui/dialog/treeview-integration) in my kendo grid custom command window (https://demos.telerik.com/kendo-ui/grid/custom-command)

 

For the first time when the user clicks on the custom command button (View Details) of any kendo grid row, the kendo tree works fine. But, when he makes a second click on custom command button on the same/different kendo grid row, the kendo tree loads forever. Also, I am newing up the kendo treeview object on every custom command button click. The dojo link is below

 

https://dojo.telerik.com/@varunmechie@gmail.com/IDOQIqaP

 

Please let me know if this can be fixed.

Thanks.

Varun
Top achievements
Rank 1
 answered on 21 Mar 2019
1 answer
1.0K+ views

Hi,

I have a question regarding custom filterable itemTemplates for kendo grids.

My team has a grid bound to a datasource that has rows of data containing two notable columns as follows:

 

1. Stage - (Can have values Draft, Pending, or Final)

2. DraftStage - (can have values ValidDraft and InvalidDraft)

 

Stage is a column that we display in the grid and DraftStage is kept hidden from the user.  However when the grid row has Stage = Draft, we mask that cell and display the row's DraftStage instead.  We have a function that converts Stage to its rows' DraftStage for display purposes only which we also utilize in creating the item template.  The issue though is that the kendo grid filters for our Stage column doesn't seem able to differentiate ValidDraft vs InvalidDraft when we mask the Draft Stage because the underlying data is still just "Draft" and so our filtering logic below does not work.  In an ideal world our filter dropdown for the Stage column will show the 4 possible filter options: ValidDraft, InvalidDraft, Pending, and Final.  As of today it will only display ValidDraft, Pending, and Final.  Selecting ValidDraft will filter for all "Draft" stages including the ones that are "InvalidDraft" which we do not want to see.  Any suggested work-arounds so that we can get our Stage column's filtering to work against two different data values for our one visible column?  Thanks for the help!

if (cols[c]["field"] == "STAGE") {
    cols[c].filterable = {
        multi: true,
        search: true,
        itemTemplate: function (e) {
            if (e.field == "all") {
                return '<li class="k-item"><label class="k-label"><input type="checkbox" class="k-check-all" value="Select All">Select All</label></li>';
            } else {
                return '<li class="k-item"><label class="k-label"><input type="checkbox" class="" value="#=data.STAGE#">#=getDisplayStage(data)#</label></li>'
            }
        }
    };
}

 

the masking function if interested:

getDisplayStage= function (dataItem) {
    return dataItem.STAGE === "Draft" ? dataItem.DRAFTSTAGE: dataItem.STAGE;
}
Konstantin Dikov
Telerik team
 answered on 21 Mar 2019
3 answers
904 views
   $("#myform").kendoValidator({

            rules:
                {
   
                    json_rule: function (input) {
                        var ret = true;
                        if (input.is("[id=pwd]")) {
                            $.ajax({
                                url: "api/HelperApi/Test" ,
                                type: 'Get',
                                data: { value: input.val() },
                                success: function (result) {
                                    ret = result === true;
                                }
                            });
                        }
                        return ret;
                    }

                },

            messages: {

                json_rule: "Json verified!",
    
       
            }
        });

I never see the message for some reason (I verified the server call, it does return true and false)
Will
Top achievements
Rank 1
 answered on 21 Mar 2019
20 answers
948 views
How would we go about duplicating the insert ordered list tool and then extending it to add style="list-style-type:lower-alpha" to the ordered list element?

We know how to add a custom tool and use jQuery to add the style, however we are not sure of what Kendo UI framework code to use to mimic the behaviour of the default insert ordered list tool and get a handle on the inserted ordered list element.
Misho
Telerik team
 answered on 21 Mar 2019
3 answers
729 views

What is the proper way of setting a filter on a datagrid from a variable?

I can manually set a filter in the parse function of the datasource but I assume there is a better way.

I've seen a post about setting the grid.datasource.filter  such as

        grid.dataSource.filter({field: "someValue", operator: "eq", value: someValue });

but when I put this in the databound event it does work but I'm getting some stack overflow errors so I assume this is wrong.

 

I've created a dojo showing what I have sofar.

Dojo

Georgi
Telerik team
 answered on 21 Mar 2019
3 answers
490 views

I'm trying out the native Angular 4 components, and I'm starting with the Slider. I was really surprised not to have value labels for the ticks. You can see that in the current documentation: http://www.telerik.com/kendo-angular-ui/components/inputs/slider/

Not having them as the default wouldn't surprise me much, but there doesn't seem to be a way to turn them on on the API: http://www.telerik.com/kendo-angular-ui/components/inputs/api/SliderComponent/

The slider in kendo-ui had this feature. Am I just missing something?

Lance
Top achievements
Rank 1
 answered on 20 Mar 2019
3 answers
640 views
Are there any variables available in a template such as the row index number? Something like ${ rowIndex } that is available automatically.

Thanks
Veselin Tsvetanov
Telerik team
 answered on 20 Mar 2019
7 answers
189 views
I have around 200 machines which i want to create a page show their status(which updates every 5 seconds)and then when click on each of them i get more detail,but i dont have any idea in Kendo which tool can help me to achieve that?
Tsvetina
Telerik team
 answered on 20 Mar 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?