Telerik Forums
Kendo UI for jQuery Forum
5 answers
1.7K+ views
Hi,

I have a Kendo Grid and I'm using InCell edit mode. Each cell has a custom editor using the column.editor assignment. I would like to prevent the cell from switching off my editor when the input is invalid. When the user enters an invalid value and then clicks outside the cell, the grid will automatically close the cell for editing and commit whatever value it had. This is far from ideal and I can't figure out a way to prevent it.

In short, I need to disable this "click outside to close editor" feature when the input entered is invalid. I tried using the "cancel" event but that event doesn't fire when clicking outside. It only fires when I explicitly call "closeCell()". I tried all sorts of other hacks like overriding the click handlers of the grid itself but it's either too dirty or just didn't work.

What is the appropriate solution for this?

Thanks!
Konstantin Dikov
Telerik team
 answered on 21 Mar 2017
1 answer
287 views

Hi All,

I am trying to get a site working after Kendo was upgraded from 2014.3.1119 to 2017.1.223. I carelessly updated a whole lot of NuGet packages at once, so Knockout, Durandal and a bunch of other things were also updated. I think I have all the dependencies right but I am still getting one error:

0x800a138f - JavaScript runtime error: Unable to set property 'ns' of undefined or null reference

This occurs at the line:     kendo.ns = "kendo-";   See the attached screenshot.

I would infer that "kendo" is not defined but I can't see why it would not be. A very old backup version of the same code (referring to older versions of Kendo and knockout) is working fine.

Any suggestions would be welcome.

Thanks in advance,

Rob

 

 

 

 

 

 

 

 

 

 

Tsvetina
Telerik team
 answered on 21 Mar 2017
1 answer
45 views

I have a simple dropdown list that I'm attaching a viewModel to though the observable method.

<input class="span-full" data-role="dropdownlist" id="DROPDOWNONE" data-bind="events: {open: getProps }, value: '+ __cols[n].name +' ">

I'm binding it to an open function like so: 

getProps: function(e){
        console.log("who am i?");
}

What I want to do is when a user opens the menu with their mouse is to have the value of the id passed to it. Like so.

getProps: function(e){

        // Code I'm missing goes here.
        // var id = grabsomething.fromsomeplace();
       console.log(id); // Outputs DROPDOWNONE
}

Please help. Thanks

Ivan Danchev
Telerik team
 answered on 21 Mar 2017
3 answers
895 views

I would like to have an event-less slot be selected when I right click on the slot. Currently, I am able to do this with events by accessing the UID and using the select() method. But an event-less slot does not have a UID that I can access when the slot is not selected, from what it seems. So, the closest that I have been able to get to selecting a slot is by using the start and end date. However, this always selects the slot in the top row of the grid, rather than the slot that I right clicked. I have seen an example of scrolling to a slot based on the row and column position, but I do not think that this selects the slot. I also do not think that the select() method accepts the row and column indices as parameters. 

Is there a method or some functionality that I can use to perform this?

Ianko
Telerik team
 answered on 21 Mar 2017
2 answers
664 views

Hi,

I am making the following call:

    splitter.ajaxRequest("#ContentPane", path);

I would like to hide the progress indicator and have tried using:

    kendo.ui.progress($("#ContentPane"), false);
    kendo.ui.progress($("#splitter"), false);

Neither of which work. Can someone enlighten me on how to best do this? I still want the progress indicator to work on other controls when doing an Ajax request, such as the treeview/dropdown...

 

Thanks,

 

Matt

Matt
Top achievements
Rank 1
 answered on 21 Mar 2017
5 answers
788 views

We are implementing the Grouping feature in our grids and we've found some issues related to the Sorting while a grid is groupíng. We see also different behaviors at the demos between doing the binding to local data and remote data.

[NOTE: We are binding to remote data.]

The issues are the following: 

*** ISSUE 1: Grouping is not sorting by default
From the initial state of the grid, if we do a column grouping, the grouping is not applying the sort. The grid is grouping only the elements that we see at the page where are.

Repro steps:
1) Open the following Dojo from the Kendo UI demo of the remote data grid: http://dojo.telerik.com/uFeHo 
2) With the default state of the grid, pick the column of Ship City for grouping
3) See the elements of the group of Albuquerque (just one)
4) Sort by the Ship City column
5) See that the elements of the group of Albuquerque are more than one
6) See also that the first group is not Alburquerque, now it's Aachen

Expectation:
Please try the same using the demo of the local data grid: http://dojo.telerik.com/iRoLa

*** ISSUE 2: Grouping sort is ordering only the page where we are

Repro steps:
1) Open the following Dojo from the Kendo UI demo of the remote data grid: http://dojo.telerik.com/uFeHo 
2) With the default state of the grid, pick the column of Ship City for grouping
3) Press the chip of the grouping to change the grouping sort

Expectation:
Please try the same using the demo of the local data grid: http://dojo.telerik.com/iRoLa

*** ISSUE 3: Grid allows to apply column sort while the column is used for grouping

Repro steps:
1) Open the following Dojo from the Kendo UI demo of the remote data grid: http://dojo.telerik.com/uFeHo 
2) With the default state of the grid, pick the column of Ship City for grouping
3) Press the Ship City column header for sort

Expectation:
Please try the same using the demo of the local data grid: http://dojo.telerik.com/iRoLa

(!) IMPORTANT
Grouping is a required feature that is critical for us...
How expensive is a workaround to disable the sort of the grouping element and fix the default sorting when the grouping is used?

Stefan
Telerik team
 answered on 21 Mar 2017
1 answer
466 views

Hi,

I used Gantt Chart to show a number of jobs and related tasks to it but my requirement is to display multiple tasks related to one job should show in one row in gantt chart. Is this features supported by Gantt Chart?

 

Thanks

Neha

Ivan Danchev
Telerik team
 answered on 21 Mar 2017
1 answer
130 views

Hi team,

I have an requirement where i  click an  <a id="name" text="Empname"></a>
When user click the attribute a i need to  call an kendo Window   window  which in terms call an  remote data source in my case web api service.
Once i get the data i need to show those fields in the  kendoWindow   and   close button  to close it.

Fields that i need show 

Name
Company Name:

<div id="dialog"></div>
<script>
$("#dialog").kendoWindow({
  autoFocus: false
});
</script>


Address:

 so how can i  call in  service from kendoWindow    and bind it to an html field like label

if you can give some reference nand mock up of code  here i can build my screen thank you again!

Thanks

 

 

Veselin Tsvetanov
Telerik team
 answered on 21 Mar 2017
1 answer
98 views

HIi Team,

 I am using tabstrip control i need to implement a funcationality which tells the screen is laoding.
in my Case its taking 5-7 sec to load i need to put image to user telling the screen is loading so that they do not hit any button  in the mean while everyting is graded out...

function onSelect(e) {
        
            $(e.contentElement).html("");
        }
 
<script type="text/javascript">
    $m = jQuery.noConflict();
    $m(document).ready(function myfunction()
    {
        function onSelect(e) {
        
            $(e.contentElement).html("");
        }
 
        $m("#tabstrip").kendoTabStrip({
            select: onSelect,
            tabPosition: "left",
            dataTextField: "desc",
            dataContentUrlField: "Url",
            dataValueField: "menuOrder",
            dataBound: function (e) {
                e.sender.select(0);
            }
 
        })//.data("kendoTabStrip").select(0);
        var dataSource = new kendo.data.DataSource(
        {
            transport:
            {
                read:
                {
                    url: "http://localhost:58030/Config/api/Featus/GetMenu",
                    type: "GET",
                    dataType: "json",                              
                    contentType: "application/json",
                    charset: "utf-8"
                }
            },
            data: {
                name: { type: "string" },
                desc: { type: "string" },
                menuOrder: { type: "string" },
                Url: { type: "string" }
            },
 
 
        });
        var tabStrip1 = $m("#tabstrip").data("kendoTabStrip");
        tabStrip1.setDataSource(dataSource);
 
    });
 
</script>

 Let me know where should i put this  loading  content.

<div id="divProcessing">

<p>Processing, please wait . . . <img src="../../Content/ajax-loader.gif"></p>

</div>

Should i put this code in tabstrip  control or in the tabstrip contents where it is displayed ?

I have done in mvc  can you help me to achive in Kendo UI

Thanks in advance!

Dimiter Topalov
Telerik team
 answered on 21 Mar 2017
1 answer
60 views

I have a function called setFilter, which sets up the current filter for the kendo scheduler and looks like:

 

function setFilter(){
                        //console.log(ownerIdArr);
                        //console.log(typeIdArr);
                        //console.log(locIdArr);
                        //console.log(descripIdArr);
                        //console.log(dateIdArr);
                        scheduler.dataSource.filter({
                            operator: function(task) {
                                //console.log(task);
                                //Check for all 5 filters
                                if(ownerIdArr.length > 0 && descripIdArr.length > 0 && locIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, descripIdArr) >= 0 && getInvitedUsers(task, ownerIdArr) && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                
                                //Check 4 filters
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && locIdArr.length > 0 && picklistIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.locId, locIdArr) >= 0 && filterPicklists(task));
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, descripIdArr) >= 0 && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && locIdArr.length > 0 && dateIdArr.length > 0)    
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);                            
                                else if(descripIdArr.length > 0 && locIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0) 
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.location, locIdArr) >= 0 && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(locIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0 && descripIdArr.length > 0) 
                                    return ($.inArray(task.location, locIdArr) >= 0 && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0 && $.inArray(task.taskId, descripIdArr) >= 0);
                                else if(locIdArr.length > 0 && ownerIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0) 
                                    return ($.inArray(task.location, locIdArr) >= 0 && getInvitedUsers(task, ownerIdArr) && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                
                                //Check 3 filters
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && picklistIdArr.length > 0)
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && getInvitedUsers(task, ownerIdArr) && filterPicklists(task));
                                else if(ownerIdArr.length > 0 && locIdArr.length > 0 && picklistIdArr.length > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && getInvitedUsers(task, ownerIdArr) && filterPicklists(task));
                                else if(descripIdArr.length > 0 && picklistIdArr.length > 0 && locIdArr.length > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, descripIdArr) >= 0 && filterPicklists(task));
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && locIdArr.length > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, descripIdArr) >= 0 && getInvitedUsers(task, ownerIdArr));
                                
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0 && dateIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(ownerIdArr.length > 0 && locIdArr.length > 0 && dateIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(ownerIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(descripIdArr.length > 0 && locIdArr.length > 0 && dateIdArr.length > 0)
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(descripIdArr.length > 0 && picklistIdArr.length > 0 && dateIdArr.length > 0)
                                   return ($.inArray(task.taskId, descripIdArr) >= 0 && filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(picklistIdArr.length > 0 && locIdArr.length > 0 && dateIdArr.length > 0)
                                    return (filterPicklists(task) && $.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                
                                //Check 2 filters
                                else if(ownerIdArr.length > 0 && dateIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(descripIdArr.length > 0 && dateIdArr.length > 0)
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(locIdArr.length > 0 && dateIdArr.length > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && $.inArray(task.taskId, dateIdArr) >= 0);
                                else if(picklistIdArr.length > 0 && dateIdArr.length > 0)
                                    return (filterPicklists(task) && $.inArray(task.taskId, dateIdArr) >= 0); 
                                   
                                else if(ownerIdArr.length > 0 && descripIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.taskId, descripIdArr) >= 0);
                                else if(ownerIdArr.length > 0 && locIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && $.inArray(task.location, locIdArr) >= 0);
                                else if(descripIdArr.length > 0 && locIdArr.length > 0)
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && $.inArray(task.location, locIdArr) >= 0);
                                else if(descripIdArr.length > 0 && picklistIdArr.length > 0)
                                    return ($.inArray(task.taskId, descripIdArr) >= 0 && filterPicklists(task));
                                else if(ownerIdArr.length > 0 && picklistIdArr.length > 0)
                                    return (getInvitedUsers(task, ownerIdArr) && filterPicklists(task));
                                else if(locIdArr.length > 0 && picklistIdArr.length > 0)
                                    return ($.inArray(task.location, locIdArr) >= 0 && filterPicklists(task));
                                
                                //Else, only check for 1 filter
                                else if(picklistIdArr.length > 0)
                                    return filterPicklists(task);
                                else if(descripIdArr.length > 0)
                                    return $.inArray(task.taskId, descripIdArr) >= 0;
                                else if(ownerIdArr.length > 0 || groupIdArr.length > 0)
                                    return getInvitedUsers(task, ownerIdArr);
                                else if(locIdArr.length > 0)
                                    return $.inArray(task.location, locIdArr) >= 0;
                                else if(dateIdArr.length > 0)
                                    return filterPicklists(task);
                                
                                else
                                    return false;
                            }
                        });   
                    }

 

The problem is... This runs after ANY change to ANY kendo widget. Changing the scheduler view makes the filter run for every task (event), when I create/edit an event, the filter runs after I click out of EVERY field in the editor/creator (which I don't get... no filtering should be happening in the create/edit popup... only after clicking save I would think...)

The filter running so much is problematic because it runs for EVERY event... so if I have 1000+ events.......... the scheduler just drags horribly and operates so slowly.

Is there anything to be done to speed this up?

Ianko
Telerik team
 answered on 21 Mar 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
AICodingAssistant
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?