Telerik Forums
Kendo UI for jQuery Forum
3 answers
269 views
Hello,

I have a massive amount of data on the server side, which I do not want to be all loaded into the Gantt at once.
Is it possible to do paging like in a grid? Or infinite scrolling (i.e. data expands as the user scrolls down).

Thanks.
Bozhidar
Telerik team
 answered on 16 May 2016
1 answer
229 views

I have grid with X number of rows. Whenever i the grid is bound with a dataset,  i need to make sure that the records present in Grid should be removed and add only records from data set 

For eg: if ID 102  is already present in grid as well as it is present in new result set, while adding additional details, grid should remove 102 and add it from the new result set. 

I wrote the below code to do this . but this is very performance inefficient, when i have 100 records in the grid and new result set adds another 100 records, this is hanging the page. 

Please help. 

                var gridExistingData = datasource.data();
                        $.grep(gridExistingData, function (d) {
                            if (resultData.length > 0) {
                                if (d != null && d.AssetID == resultData[i].AssetID) {
                                    gridExistingData.remove(d);
                                }
                            }
                        });

Please suggest if there is any alternative process to achieve this

Kiril Nikolov
Telerik team
 answered on 14 May 2016
1 answer
87 views

Users that use inline Kendo Editor in Chrome on Surface Pro cannot insert a new table. It can be reproduced by using latest version of Chrome (with enabled #touch-events flag) on Surface Pro. When #touch-events flag is disabled through "chrome://flags" everything works fine. The results can be seen online: 

http://demos.telerik.com/kendo-ui/editor/inline-editing

Try adding a table using the tool from the toolbar. If you use Chrome on Surface Pro with enabled touch events choosing the size of the table will not add the table to the editable area. Again, disabling touch events in Chrome solves the problem but it's not an acceptable solution.

Ianko
Telerik team
 answered on 14 May 2016
1 answer
98 views

I want to populate the current month with dates which are retrieved from a web endpoint, however the value of the dates field is not rendered unless they're set at the time of construction.

How do I make the calendar recognize the change to the dates field?

Kiril Nikolov
Telerik team
 answered on 14 May 2016
1 answer
144 views

http://dojo.telerik.com/@DGOBRIEN/EkIze

 

01.<!DOCTYPE html>
02.<html>
03.<head>
04.    <meta charset="utf-8"/>
05.    <title>Kendo UI Snippet</title>
06. 
08.    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.2.504/styles/kendo.rtl.min.css"/>
11. 
12.    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
14.</head>
15.<body>
16.   
17.<input id="datepicker">
18.<script>
19.$("#datepicker").kendoDatePicker({
20.    value: new Date(2015,9,3),
21.    disableDates: [new Date(2015,9,12), new Date(2015,9,22), "sa" , "su" ]
22.});
23.</script>
24.</body>
25.</html>

 

How to combine date based and day based disabled dates?

Kiril Nikolov
Telerik team
 answered on 14 May 2016
2 answers
368 views
I'm trying to use the MVC ViewBag to set an items text dynamically.  However I get error messages when I do the following:

items.Add().Text(ViewBag.AppContext.UserDisplayName)

However, if I do something like the below, it works.  So I think it has to do with the ViewBag not being available (timing).

items.Add().Text(User.Identity.Name)

Here's the error when I try and use ViewBag data - CS1977: Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type.

Thoughts?
Jose Molina
Top achievements
Rank 1
 answered on 13 May 2016
2 answers
191 views
Hi,
We studied the stacked bar example published at http://demos.telerik.com/kendo-ui/bar-charts/stacked-bar

We try to implement a similar chart. Our data is based on a dynamic calculation and we currently pack it in the way demonstrated in the example below. We tried various ways to use this data for stacked bars chart and all failed (ended up with an empty output probably because the chart did not know how to "read" our data). Can you please guide us how we can use the following data in order to present a stacked bars chart in which we stack every item. The desired result is a category for each month (for example 7/2015) and for each category we will present a stacked bar consists of the totals of each item bucket for this month:

{
    "items": [
        {
            "itemID": "1827",
            "buckets": [
                {
                    "month": "7/2015",
                    "total": 0,
                },
                {
                    "month": "8/2015",
                    "total": 0,
                },
                {
                    "month": "9/2015",
                    "total": 0,
                },
                {
                    "month": "10/2015",
                    "total": 18.72,
                }
            ]
        },
        {
            "itemID": "1826",
            "buckets": [
                {
                    "month": "7/2015",
                    "total": 10,
                },
                {
                    "month": "8/2015",
                    "total": 5,
                },
                {
                    "month": "9/2015",
                    "total": 0,
                },
                {
                    "month": "10/2015",
                    "total": 0,
                }
            ]
        },
        {
            "itemID": "1957",
            "buckets": [
                {
                    "month": "7/2015",
                    "total": 3.6,
                },
                {
                    "month": "8/2015",
                    "total": 8.2,
                },
                {
                    "month": "9/2015",
                    "total": 0,
                },
                {
                    "month": "10/2015",
                    "total": 0,
                    "counter": 0
                }
            ]
        }
    ]
}
Ron
Top achievements
Rank 1
Veteran
 answered on 13 May 2016
3 answers
977 views

Hi,

I am creating a kendo grid and trying to get paging working. I have updated the dataSource schema so that total is set and I can see from the console.log output that it returns a value but I still get the message "No items to display" and the paging doesnt work. Below is the the kendo grid code and a sample of the json returned. Can anyone see what I am doing wrong?

 

$("#requestBreakdown").kendoGrid({
            dataSource: {
                type: "json",
                transport: {
                    read: "/home/Grid_DataSource?startDate=01/05/2016&endDate=12/05/2016",
                    dataType: "json"
                },
                pageSize: 2,
                serverPaging: false,
                schema: {
                    data: "Data",
                    total: function (data) {
                        console.log(data.Total);
                        return data.Total;
                    },
                }

            },
            groupable: false,
            sortable: true,
            pageable: true,
            columns: [
                { field: "TITLE", title: "Title" },
            ]
        });

 

JSON response

{"Data":[
{"WORKORDERID":1,"TITLE":"First"},
{"WORKORDERID":2,"TITLE":"Second"},
{"WORKORDERID":3,"TITLE":"Third"}
//ADDITIONAL ITEMS REMOVED
],"Total":124}

Chris
Top achievements
Rank 2
 answered on 13 May 2016
7 answers
1.0K+ views
Hello,

I have a treeview in a splitter and on serach i select the node by id and then shouold scroll the treeview so that the selected node is visible. the selection works but treeview will not scroll atall. i have tried Setting focues as well but it will not move at all.

here is the jquery part for selection amnd then scrolling
​ node = treeview.findByUid(ds.get(path[0]).uid);
treeview.select(node);

treeview.trigger("select", { node: node });
node.scrollIntoView(true);
node.Focus();

Thanks

anamika
Alex Gyoshev
Telerik team
 answered on 13 May 2016
2 answers
1.9K+ views

We actually test Kendo UI with angular.

We have an error when we want to update or destroy line in the grid (inline edition mode).

it's certainly an error in the "transport" code block, but i don't find it.

the error is "Cannot read property 'call' of undefined"

the hml part is simplistic :

 

<div kendo-grid k-options="mainGridOptions2" style="height: 600px; width: 900px">

 

this is our Controller code :

 

'use strict';
 
/**
 * @ngdoc function
 * @name kendoTestApp.controller:PersonsPersonslistCtrl
 * @description
 * # PersonsPersonslistCtrl
 * Controller of the kendoTestApp
 */
angular.module('kendoTestApp')
  .controller('PersonsPersonslistCtrl', function ($resource, $scope, $rootScope) {
 
      $scope.mainGridOptions2 = {
          editable:"inline",
          dataSource: {
 
              transport: {
                  read:
                  function(e){
                          
 
                      var testData = [
                          {
                              "FirstName": "Ken",
                              "Id": 1,
                              "LastName": "Ruffort",
                              "ModifiedDateString": "2016-03-15T11:44:33.1370000",
                              "Title": null,
                              "TypeString": "SC"
                          },
                          {
                              "FirstName": "Gigi",
                              "Id": 2,
                              "LastName": "Lopez",
                              "ModifiedDateString": "2002-02-23T00:00:00.0000000",
                              "Title": null,
                              "TypeString": "VC"
                          },
                          {
                              "FirstName": "Robert1",
                              "Id": 3,
                              "LastName": "Tamburello",
                              "ModifiedDateString": "2015-07-18T00:00:00.0000000",
                              "Title": null,
                              "TypeString": "EM"
                          }];
 
                      e.success(testData);
 
 
 
                      },
                  update:
                      function(e){
                          console.log("update");
                      },
                  destroy: function (e) {
                      console.log("destroy");
 
                  },
                  parameterMap: function(options, operation) {
                      if (operation !== "read" && options.models) {
                          console.log("parameterMap");
 
                          return {models: kendo.stringify(options.models)};
 
                      }
                  }
              },
              schema: {
                  model: {
                      fields: {
                          FirstName: {type: "string"},
                          Id: {type: "number"},
                          LastName: {type: "string"},
                          ModifiedDateString: {type: "date"},
                          Title: {type: "string"},
                          TypeString: {type: "string"}
                      }
                  }, parse: function (data) {
                      $.each(data, function (i, val) {
                          val.ModifiedDateString = new Date(val.ModifiedDateString);
                          val.ModifiedDateString.setHours(0, 0, 0, 0);
                         // console.log(val.ModifiedDateString);
 
                      });
                      return data;
                  }
              },
              pageSize: 20,
              batch:false,
              serverPaging: false,
              serverFiltering: false,
              serverSorting: false
          },
          columns: [
              {
                  field:'Id',
                  title: 'Id',
                  width:'70px'
 
              },
              {
                  field:'FirstName',
                  title: 'firstname' ,
                  width:'120px',
                  template:'{{dataItem.Title}} {{dataItem.FirstName}}' ,
                  type:'string',
                  filterable:{
                      cell:{operator:"contains"}
                  }
              },
              {field:'TypeString',title: 'Type' , width:'120px' , type:'string',filterable:{multi:true}},
 
              {field:'LastName',title: 'LastName' , width:'120px' , type:'string'},
              {
                  field:'ModifiedDateString',
                  title: 'ModifiedDateString' ,
                  width:'120px',
                  format: "{0:MMM dd, yyyy}",
                  parseFormats: "{0:MM/dd/yyyy}",
                  headerTemplate: '<label for="check-all"><b>Start Date</b></label>',
                  headerAttributes: { style: "text-align: center;" },
                  attributes: { style: "text-align:center !important;padding-right: 25px;" },
                  filterable: {
                      ui: function (element) {
                          element.kendoDatePicker({
                              format: "MMM dd, yyyy"
                          });
                      }
                  }
              },
              {command:[{name:"edit",text:""},{name:"destroy",text:""}],title:" ", width:"200px"}],
 
          sortable: true,
          pageable:{
 
              pageSizes:[10,20,100,500],
              buttonCount:5
 
 
          },
          scrollable:true,
          toolbar:["create"],
          filterable:true
      };
 
 
 
 
 
 
  });

Alexandre
Top achievements
Rank 1
 answered on 13 May 2016
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?