Telerik Forums
Kendo UI for jQuery Forum
0 answers
256 views

I seem to be getting a memory leak on the grid widget. I pasted my code is below. In Firefox 12, when the application first runs up, Windows Task Manager says it is taking up around 60Mb of memory. If you click the add button, the memory used grows to around 85Mb, When you click the remove button, the memory does reduce a bit (after about 30 secs), but it only reduces to around 80Mb.

Is there leak in my code or kendo grid widget?

<!DOCTYPE html>

<html>

<head>

    <title>test</title>

    <script src="Scripts/jquery.min.js"></script>

    <script src="Scripts/kendo.web.min.js"></script>

    <link href="Styles/kendo.common.min.css" rel="stylesheet" />

    <link href="Styles/kendo.metro.min.css" rel="stylesheet" />

</head>

<body>

    <div>

        <button id="add" value="add">add</button>

        <button id="remove" value="remove">remove</button>

        <div id="grid"></div>

    </div>

    <script>

        $(document).ready(function () {

            $("#add").click(function () {

                var data = [],

                sharableDataSource,

                i;

                for (i = 0; i < 5000; i = i + 1) {

                    data.push({ field: "value " + i

                    });

                }

                sharableDataSource = new kendo.data.DataSource({ data: data });

                $("#grid").kendoGrid({

                    groupable: false,

                    scrollable: true,

                    sortable: true,

                    pageable: false,

                    resizable: true,

                    selectable: "row",

                    dataSource: sharableDataSource,

                    columns: [{ field: "field", title: "field" }]

                }).data("kendoGrid");

                data = null;

                sharableDataSource = null;

            });

            $("#remove").click(function () {

                $("#grid").empty();

            });

        });

    </script>

</body>

</html>

Maarten
Top achievements
Rank 1
 asked on 25 Jun 2012
0 answers
135 views
Hi,
is there a standard way to show  already uploaded files and provide a delete button for them?
Developix
Top achievements
Rank 1
 asked on 25 Jun 2012
7 answers
521 views
Hi,

Trying to get the basic Grid sample to work.  Getting the following errors...

SCRIPT5007: Object expected
kendo.all.min.js, line 1 character 13464
SCRIPT438: Object doesn't support property or method 'kendoGrid'
index.html, line 19 character 2

Here is my HTML - any help is appreciated as I'm sure it is a basic, newbie mistake.

<html>
<head>
    <title>Test Kendo</title>
    <!--In the header of your page, paste the following for Kendo styles-->
    <link href="../js/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <link href="../js/kendo.kendo.min.css" rel="stylesheet" type="text/css" />
    <!--Then paste the following for Kendo scripts -->
    <script type="text/javascript" src="jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="js/kendo.all.min.js"></script>
</head>
<body>
    <div id="grid">
    </div>
    <script type="text/javascript">
        $("#grid").kendoGrid({ columns: [{ field: "FirstName", title: "First Name" }, { field: "LastName", title: "Last Name"}], dataSource: { data: [{ FirstName: "Joe", LastName: "Smith" }, { FirstName: "Jane", LastName: "Smith"}]} });
    </script>
</body>
</html>
 
Jeremiah
Top achievements
Rank 1
 answered on 25 Jun 2012
1 answer
253 views
I have a requirement that if the series type of line hits 0 to break the line and continue once the series has another value above 0.

Is this possible? Can I hide certain data points?

Let me know if a visual would help.
Iliana Dyankova
Telerik team
 answered on 25 Jun 2012
4 answers
370 views
Is there some way that I can get DataViz to automatically generate a nice looking axis when using dates on the category axis? It would be helpful if it for instance could choose an appropriate step size etc. automatically. 

If this isn't possible I have another question. How do I make it step over some ticks cause I only want ticks where I have labels.

Thanks
Iliana Dyankova
Telerik team
 answered on 25 Jun 2012
1 answer
406 views
I have a grid with a custom toolbar, which have dynamical data showed related to data in the grid. When there are changes in the grid, the toolbartext must be updated to the new values.

Is there a way to refresh/reload the toolbar?
Eel
Top achievements
Rank 1
 answered on 25 Jun 2012
5 answers
431 views
Every sample I can find works on the premise of multiple rows of data coming back.

In our case there is only one row being returned because this is a single item edit screen.

I have a Web API request that returns an object. Here's the response from the call:

{
  "FirstName": "James",
  "LastOrCompanyName": "Hancock",
  "MiddleName": "Robert",
  "Salutation": "Mr.",
  "Suffix": null,
  "Individual": true,
 <...more fields...>
}

It's formatted exactly like that with Json.

What I'm attempting to do is put text boxes that allow edit of those values.

Here's what I have:

var Contact = kendo.data.Model.define({
        ID: "ID"
    });


    dataSource = new kendo.data.DataSource({
        type: "json", // specifies data protocol
        transport: {
            read: { url: "/api/v1/contacts/GetContactByID?id=" + ContactID },
        },
        schema: {
            model: {
                    id: "ID"
            }
        },
        change: function (e) {
            selectedContact = e;
        },
        error: function (e) {
            debugger;
        }
    });

    var viewModel = kendo.observable({
        dataSource: dataSource,
        hasChanges: false,
        change: function () {
            this.set("hasChanges", true);
        }
    });


    kendo.bind($("#contact-info"), viewModel);


for sake of argument I also bound a grid to the datasource like so:

    $("#g-contact-info").kendoGrid({
        groupable: true,
        scrollable: { virtual: true },
        sortable: true,
        pageable: true,
        dataSource: dataSource
    });

The grid doesn't display any data even though one item came back.

And I can't figure out any way to logically set the observable to the first item even if it did. I was expecting some sort of data control on the observable that allowed you to change which is the current item just like a BindingSource in Winforms or something.

Can someone help with the two issues? First being the data not coming back and binding properly, the second being how do I get the observable to set properly and get my selectedContact set with the right value.

Thanks!
Gareth
Top achievements
Rank 1
 answered on 25 Jun 2012
3 answers
956 views
Hi ,
I am developing an application using kendoui grid,and i am facing a problem
when grouping the records according  to different columns.
I want to have records grouped by name column and at the same time have footerTemplate and groupFooterTemplate for quantity  column.
When i add another column on grouping i get an error 'sum is not defined'.
I have looked around on kendo forums, and even the following forum topic:
http://www.kendoui.com/forums/ui/grid/groupable-aggregates-and-groupfootertemplate-problems.aspx

doesn't resolve me the problem.(which looks me more similar to my problem).
I am putting the columns,group,aggregates and fields using php variables:
$arr=array(array('field'=>'pol','title'=>'Part Number','width'=>'200px','aggregates'=> "count", 'groupHeaderTemplate'=> "Part Number: #=value#"),
     array('field'=>'name','title'=>'PO ','aggregates'=> "count", 'groupHeaderTemplate'=> "PO Teknema: #=value#"),
     array('field'=>'po_supp','title'=>'PO Supplier','aggregates'=> "count", 'groupHeaderTemplate'=> "PO Supplier: #=value#"),
     array('field'=>'seltc','title'=>'Quantity Received','aggregates'=> "count", 'groupHeaderTemplate'=> "Quantity Received: #=value#"),
     array('field'=>'pol_qty','title'=>'Qty to Receive','aggregates'=> "sum", 'footerTemplate'=> "Total Sum: #=sum#",'groupFooterTemplate'=> "Sum: #=sum#" ),
     array('field'=>'qty_purchased','title'=>'Total Qty','aggregates'=> "count", 'groupHeaderTemplate'=> "Total Qty: #=value#"),
     //array('field'=>'prod_name','title'=>'Part Number'),
     array('field'=>'rif_ordine','title'=>'Rif.Ordine','aggregates'=> "count", 'groupHeaderTemplate'=> "Rif.Ordine: #=value#"),
     array('field'=>'project','title'=>'Project','aggregates'=> "count", 'groupHeaderTemplate'=> "Project: #=value#"),
     array('field'=>'po_ref','title'=>'PO Reference','aggregates'=> "count", 'groupHeaderTemplate'=> "PO Reference: #=value#"),
  );
$columns=json_encode($arr);
$arr=array(
    'pol'=>array('type'=>'string'),
    'name'=>array('type'=>'string'),
    'po_supp'=>array('type'=>'string'),
    'seltc'=>array('type'=>'string'),
    'pol_qty'=>array('type'=>'number'),
    'qty_purchased'=>array('type'=>'number'),
    //'prod_name'=>array('type'=>'string'),
    'rif_ordine'=>array('type'=>'string'),
    'project'=>array('type'=>'string'),
    'po_ref'=>array('type'=>'string'),
     );
$fields=json_encode($arr);
$arr=array('field'=>'name',
    'aggregates'=>array(
        array('field'=>'pol','aggregate'=>'count'),
        array('field'=>'name','aggregate'=>'count'),
        array('field'=>'po_supp','aggregate'=>'count'),
        array('field'=>'seltc','aggregate'=>'count'),
        array('field'=>'pol_qty','aggregate'=>'sum'),
        array('field'=>'qty_purchased','aggregate'=>'count'),
        array('field'=>'rif_ordine','aggregate'=>'count'),
        array('field'=>'project','aggregate'=>'count'),
        array('field'=>'po_ref','aggregate'=>'count'),
        )
        );
$group=json_encode($arr);
$arr=array(
    array('field'=>'pol','aggregate'=>'count'),
    array('field'=>'po_supp','aggregate'=>'count'),
    array('field'=>'seltc','aggregate'=>'count'),
    array('field'=>'pol_qty','aggregate'=>'sum'),
    array('field'=>'qty_purchased','aggregate'=>'count'),
    array('field'=>'rif_ordine','aggregate'=>'count'),
    array('field'=>'project','aggregate'=>'count'),
    array('field'=>'po_ref','aggregate'=>'count'),
     );
$aggregate=json_encode($arr);

and then pass these variables on js 


Please Help me to solve the problem.
Thanks in advance
Atanas Korchev
Telerik team
 answered on 25 Jun 2012
1 answer
181 views
We need uniform implementation and dedicated documentation similar to "Configuration" that describes how to declaratively bind controls.  I'm having to do a lot of repetitive coding for binding that should be a simple declarative structure.  You should be able to enable a property on your kendo framework and request it to declaratively data bind and off you go.  Very little coding necessary.  For example:

<input id="siteList" class="ctrlDropDown" data-template="#siteListTemplate" data-dataurl="Layout/sites.json" data-selector="sites" /> 

    $(".ctrlDropDown")
    .each(function (index, htmlControl) {
        var control = $(htmlControl);
        var dataSourceUrl = control.attr("data-dataurl");
        //alert(dataSourceUrl);
        var dataSourceCallback = control.attr("data-datacallback");
        var template = control.attr("data-template");
        var dataType = control.attr("data-type");
        var dataText = control.attr("data-text");
        var dataValue = control.attr("data-value");
        var dataSelector = control.attr("data-selector");
        //alert(dataSelector);
        var dataSource = new kendo.data.DataSource({
            type: (dataType != null) ? dataType : null,
            transport: {
                read: {
                    url: dataSourceUrl,
                    jsonpCallback: (dataSourceCallback != null) ? dataSourceCallback : ""
                }
            }
        });
        dataSource.fetch(function (data) {
            //alert(JSON.stringify(data.sender._pristine));
            control.kendoDropDownList({
                autoBind: true,
                dataTextField: dataText,
                dataValueField: (dataValue != null) ? dataValue : dataText,
                template: (template != null) ? kendo.template($(template).html()) : null,
                dataSource: (dataSelector != null) ? eval("data.sender._pristine." + dataSelector) : data.sender._pristine
            });
        });
    });
Atanas Korchev
Telerik team
 answered on 25 Jun 2012
1 answer
113 views
Hi all,

I'm looking at the splitview demo on this link http://demos.kendoui.com/beta/mobile/splitview/index.html and I try to create the prototype using its demo source code with kendo trial version, but I think the data-role 'splitview' and 'pane' didn't work well. Can anyone help me, please? Or this feature is available for only the licensing version?

Thanks 
Kamen Bundev
Telerik team
 answered on 25 Jun 2012
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?