Telerik Forums
Kendo UI for jQuery Forum
7 answers
1.6K+ views
Hi,

I was working with Datasource and Grid and doing some mass updates for the data (see my earlier post about what I'm trying to achieve). For smaller datasets everything went okay.

Then I tried with real data, having a couple of thousand rows. It's quite big, but I would like to avoid server pagination at this point, since I'd like to use Kendo filters and sorting on the data.

It turns out setting data values is roughly of quadratic complexity and for my use it takes far too long to be actually usable. My timing test results are as follows:
100 rows of data, ~1200 ms
200 rows of data, ~4600 ms
400 rows of data, ~16000 ms

My question is, am I doing something wrong? What is the correct and performance-aware way of updating Datasource contents? Here's the code that causes the problem:
01.$("#testi").click(function() {
02.    var data=DS.data();
03.    for (var i=0; i<data.length; i++) {
04.        var row = DS.at(i);
05.        if(row.fi==row.en) {
06.            row.set("ok", true);
07.        } else {
08.            row.set("ok", false);
09.        }
10.    }
11.});
It seems that row.set is the slow one. I tried accessing the data on if condition with both "row.fi" and "data[i].fi", but turns out they are both very fast.

I also tried replacing var row = DS.at(i); with var row = data[i]; but they seem to do virtually the same thing with no performace difference.

For what it's worth, I'm on Google Chrome 27.
Ali
Top achievements
Rank 1
 answered on 07 Apr 2015
4 answers
175 views

For my pie chart, I see that I can set startAngle, but I don't see where I can set the direction of the pie pieces. I would like pie pieces to be added counter-clockwise. Currently, they are added clockwise.

FYI, I am also setting a sort on the data, so the largest is always first. Right now the largest is taking the 12-3pm pie piece, the second largest taking 3-5pm, etc. I want them to go 12-9pm, 9-7pm.

Thanks,

--Ed

Iliana Dyankova
Telerik team
 answered on 07 Apr 2015
10 answers
215 views
Hi,
I am trying to work on a sample whereby I read data locally into the DataSource but I submit changes to server.

Here is a dojo, however, an exception occurs when a call for dataSource.sync() is executed.

Any idea why that is happening?

http://dojo.telerik.com/@bhaidar/AYALi


Thanks
Daniel
Telerik team
 answered on 07 Apr 2015
2 answers
108 views

The crosshairs in line charts and sparklines do not disappear reliably.  This behavior is apparent even on the demo page for sparklines.  The result is that there is an extra vertical bar that is stuck on the chart.  Hovering over the chart again sometimes fixes the issue.

 This behavior can be confusing to a user if the crosshair remains stuck at the end of the chart and the color of the lines look similar, it may look like the data drops off at the end.

Iliana Dyankova
Telerik team
 answered on 07 Apr 2015
4 answers
158 views
I have a requirement to put a large amount of data into a Kendo UI grid and want to have the best performance possible.  I reviewed the Virtualization of Remote Data example at http://demos.telerik.com/kendo-ui/grid/virtualization-remote-data .  What are the specs/requirements for the server-side service that will provide the data to be consumed by the grid?  I only see sample client-side code(JavaScript).  Please advise, thanks.
John
Top achievements
Rank 1
 answered on 06 Apr 2015
1 answer
99 views

In kendo.all.d.ts there is an interface for the AutoComplete select event args:

    interface AutoCompleteSelectEvent extends AutoCompleteEvent {
        item?: JQuery;
    }

In my code this will generate a Typescript error about not matching the AutoCompleteOptions interface:

$("#Data_Part_Description").kendoAutoComplete({
                select: (e) => { }

}

 What is weird is that if I rename item in AutoCompleteSelectEvent to anything other than item it works.

    interface AutoCompleteSelectEvent extends AutoCompleteEvent {
        i?: JQuery;
    }


Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
 answered on 06 Apr 2015
3 answers
124 views
Hi,

I am facing a problem using a custom editor NumericTextBox inside a Grid.

Check this dojo please: http://dojo.telerik.com/@bhaidar/oSaxA

I am facing same problem locally. The data bound to the custom editor is a number.

Regards
Bilal
Alexander Valchev
Telerik team
 answered on 06 Apr 2015
9 answers
2.1K+ views
Is it possible to define a template for the legend? Just as it's possible to do for the tooltips and labels?

Thanks
Iliana Dyankova
Telerik team
 answered on 06 Apr 2015
1 answer
226 views
I am trying to implement serverPaging sorting by using Webapi.
I use angularjs in UI side.

i have implemented server side code. which accept kendoRequest and returns kendoResponse.
it returns data as well.
but grid trying to load it throughs undefined is not a function, i have attached screenshot of error.

here is my code

 $scope.mainGridOptions = {
        columns:["Country","RiskReference"],
        dataSource: new kendo.data.DataSource({
            transport: {
                read: {
                    url: serviceBase + "api/Policy/GetPolicyPage/" + $scope.policyId,
                    type: "POST",
                    contentType: "application/json"
                },
                parameterMap: function (options, operation) {
if (operation === "read") {
  
return kendo.stringify(options);
                    }
                            
              return options;
                }
            },
            pageSize: 10,
            serverPaging: true,
            serverSorting: true
        }),
        sortable: true,
        pageable: true,
        resizable: true,
        selectable: "single cell",
        editable: "popup",
        schema: {
         
         data:"Data",
      
         total: "Count"
        },error: function (e) {
            console.log(e.statusText);
        }
    };



See attached file for data format return from my webapi service.

please review my code, is there anything am i missing?

regards,
Saad
Boyan Dimitrov
Telerik team
 answered on 06 Apr 2015
1 answer
91 views
MVC, v.2015.1.318

1. Filtering by ForeignKey.
When I try to filter on a ForeignKey column, the first choice of the value is ignored. On the second - ok.
http://demos.telerik.com/kendo-ui/grid/foreignkeycolumn -  had same problem

2. Change Value in ForeignKey.
My source:
...
.DataSource(dataSource => dataSource
                .Ajax()
                .Events(events =>
                    events.Error("errorHandler")
                    .Change("changeDS")
                   )
...
    .Update(update => update.Action("Update", "xxx", new { ... }))
...
function changeDS(e) {
        console.log(e.action);
}

...
If value in column in was null and I select new value, then "changeDS" and "Update" not called.


2013 version had no such problems.


Boyan Dimitrov
Telerik team
 answered on 06 Apr 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?