Telerik Forums
Kendo UI for jQuery Forum
2 answers
105 views
I have a batch editing grid where the user can add a new row either by clicking the Add button or tabbing off of the last editable column. The Add button works as intended...it adds a new row at the bottom of the grid and puts the keyboard focus in the first column of the new row.

The problem I am having is calling addRow programatically. It creates the new row at the bottom of the grid, but it automatically puts the keyboard focus in the second column of the new row. I want it to behave the same way as pressing the Add button. Here is the script that catches my keypress [TAB], and determines if it is the last row and last column (in my case it's column index 6). 

function onDataBound(e) {
               var grid = $("#VINGrid").data("kendoGrid");
 
               $(grid.tbody).on("keydown", "td", function (e) {
                 
 
                 if (e.keyCode == 9)
                 {
                       var row = $(this).closest("tr");
                       var rowIdx = $("tr", grid.tbody).index(row);
                       var colIdx = $("td", row).index(this);
 
                       var count = grid.dataSource.total();
 
                       if(rowIdx == count-1 && colIdx == 6)
                       {
                           grid.addRow();
                       }
                   }
               });
           }

Any idea why my script is automatically moving it to the second column? 

Thanks,
Jason
Dimiter Madjarov
Telerik team
 answered on 11 Feb 2014
5 answers
1.1K+ views
Is there a way to clear all the tabs?
Thanks in advance.
Kamen Bundev
Telerik team
 answered on 11 Feb 2014
1 answer
258 views
We have a need of user date input into custom fields in 2 scenarios:
1) have datepicker inlined to the page (not as popup tied to a input control).
2) have it pop up next to a custom control, opened by a click on a separate button (so that it doesn't redraw/redraw the custom control).
After pick the date is actually populated/calculated to multiple controls on the page.

I tried to attach it to a hidden input (and handle all the data in eventhandlers) but in this case the picker widget is located at top-left corner of the window.

Are these scenarios possible?

 Raido
Georgi Krustev
Telerik team
 answered on 11 Feb 2014
1 answer
126 views
I wonder what will happen if the number of tasks is high.
As I have understood it, the scheduler will ask the data source for all event regardless of how many they are.
Vladimir Iliev
Telerik team
 answered on 11 Feb 2014
2 answers
124 views
Existing Service Layer With DTOs
How do I get my existing dataservice layer, which returns DTOs, to support virtual scrolling? I can pass the DataSourceRequest object to the service layer where the DTOs are created but I can't seem to translate the request object into any useful queries.

Manual Filtering Seems Clunky
I can manually implement some of the filtering by using switch statements but this has a horrible amount of overhead.

Dynamic Expression Trees
I was thinking maybe I could create something that parses the FilterDescriptors and creates LINQ Expression Trees to apply to the IQueryable somehow but this also seems to be a little complex for my liking. I like this idea because I can see the power of learning how this API works but I don't have the time to author this at the moment. I also don't know if this will be feasible for performance. 

Where are all the code examples?
I haven't seen any examples that help me tackle this problem. 

jwize
Top achievements
Rank 1
 answered on 10 Feb 2014
6 answers
1.8K+ views
I would like to change the color of the Kendo Mobile switch when it is in it's on position. By default it is white text in a blue background, but I want a green background.

I haven't been able to find the right css to do that and the themebuilder doesn't seem to be able to do that?

Any hints?
Zdravko
Telerik team
 answered on 10 Feb 2014
5 answers
323 views
This is what I'm trying...

<select data-value-field="Id" multiple="multiple" data-placeholder="Select Category..." data-text-field="Title" data-item-template="#: data.FullPath #" data-role="multiselect" data-type="HierarchicalTaxa" >

However its throwing an error
Error: Syntax error, unrecognized expression: ##: data.FullPath #

??
Georgi Krustev
Telerik team
 answered on 10 Feb 2014
2 answers
105 views
Hello,

I want to show a first chart with a datasource pagesize, then another with same datasource but another pagesize.

When trying following, I can see first chart show my first pagesize, then, when second chart shows, first chart pagesize is change to second page size.

see following example:

function createChart() {

myData.pageSize(20);

$("#MyChart").kendoChart({
dataSource: myData,
series: [{type: "bar",field: "nb",categoryField: "name",name: "#= group.value #",markers: {visible: true,size: 1},aggregate : "avg",},],
legend: {position: "bottom",labels: {template: "my name"}},
valueAxis: {visible:false,labels: {format: "{0}", step:3},majorGridLines: {visible: false},majorTicks: {visible: false},format: "{0}%",},
categoryAxis: {field: "my field",majorGridLines:{visible: false},majorTicks:{visible: false},},
tooltip: {visible: true,template: "#=category #: #= value #"},
transitions: true,
});

myData.pageSize(50);

$("#MyChart").kendoChart({
dataSource: myData,
series: [{type: "bar",field: "nb",categoryField: "name",name: "#= group.value #",markers: {visible: true,size: 1},aggregate : "avg",},],
legend: {position: "bottom",labels: {template: "my name"}},
valueAxis: {visible:false,labels: {format: "{0}", step:3},majorGridLines: {visible: false},majorTicks: {visible: false},format: "{0}%",},
categoryAxis: {field: "my field",majorGridLines:{visible: false},majorTicks:{visible: false},},
tooltip: {visible: true,template: "#=category #: #= value #"},
transitions: true,
});

}

$(document).ready(function() {
createChart();
});



Thank you,
Dan
dan
Top achievements
Rank 1
 answered on 10 Feb 2014
4 answers
101 views
Hi,

I have come across an issue where when I am using selectable: "multiple, cell", in combination with incell editing the editor is not always removed correctly.

If the incell editor is being displayed and then the user clicks either a single cell or off the grid the editor is correctly removed.
However if the user selects multiple cells then the editor loses focus, but is not removed. This leaves it on the screen.

I have been able to clear the editor by adding a change event to the grid:
change: function (e) {
  this.closeCell();
},

I am a little wary of my workaround as currently have a different issue with manually calling closeCell()
See: http://www.telerik.com/forums/grid-not-activeelement-when-selecting-a-single-cell-when-using-multiple-cell-select

Is this a bug?
Is my workaround correct and likely safe?

Thanks
Euan
Dimiter Madjarov
Telerik team
 answered on 10 Feb 2014
6 answers
72 views

Hi,

The documentation states the following about the change event: Fired when the user selects a cell or event in the scheduler.

During testing I discovered that the change event is raised whenever something on the scheduler is clicked i.e.

  • Show business hours
  • Date navigation

I tried to filter on the e.slots.length property of the event arguments, but this isn't robust enough. When you accidently select a slot and click "Show business hours", the e.slots array is not reset.

Kiril Nikolov
Telerik team
 answered on 10 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?