Telerik Forums
Kendo UI for jQuery Forum
5 answers
1.2K+ views

For a project I'm currently working on I need my users to be able to add their own rows into an existing excel sheet. However, when I press the 'Insert row below' or 'Insert row above' buttons I get a message saying: "Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet." Afterwards I noticed that all excel sheets seem to have a fixed height.

I've tried these things:

  • $("#spreadsheet").data("kendoSpreadsheet").activeSheet()._rows._count += 5;
  • $("#spreadsheet").data("kendoSpreadsheet").activeSheet().insertRow(<current last row index>);
  • $("#spreadsheet").data("kendoSpreadsheet").activeSheet().range(<current last row index>).values([''])

I'm not using a datasource, I'm filling the sheet using an AJAX call and the 'fromJSON' method. This is because I need to manipulate some of the data before sending it to the client.

 

Ivan Danchev
Telerik team
 answered on 14 Apr 2017
1 answer
134 views

The panelbar is dynamically generated in the .cshtml and some admins are entering <ul><li> items and it's causing the content zone to generated L2+ panelbar items.

 

I'd just like the ROOT to be a panelbar, and just render html in the content area.

 

Possible?

 

 

Nencho
Telerik team
 answered on 14 Apr 2017
4 answers
2.7K+ views
Hi all, I'm using the kendoUpload module on my ruby on rails application, everythings is except for the fact that kendoUpload fires an error event even if the file is correctly uploaded.

My javascript code is this:

function onError(e) {
   console.log("Error (" + e.operation + ") :: " + getFileInfo(e));
 }
 
$("#media_filename").kendoUpload({
        async: {
            saveUrl: '/admin/media/',
            removeUrl: '/admin/media/remove',
            autoUpload: true
        },
        multiple: true,
        upload: onUpload,
        success: onSuccess,
        error: onError,
        complete: onComplete
    });

the code from my controller gives me back a 200 ok http header (I see with on firebug), but (as you can se from the attach) the kendoUpload components tell's me that the file isn't uploaded but it is not true.

Any hint? Do you need more information?
Dimiter Madjarov
Telerik team
 answered on 14 Apr 2017
3 answers
512 views

Hi,

 

I have a kendo sortable grid which allows the user to drag and drop rows so that the rows can be re-ordered.

This re-ordering needs to be updated to a Seq variable which is part of the dataItem.

The grid itself reads, creates, updates and deletes using a rest service.

I've referred to the telerik sortable demo using the following link : http://docs.telerik.com/kendo-ui/controls/interactivity/sortable/how-to/use-sortable-grid

My grid contains more than 10 items. 

After the drag and drop operation is completed, the change function updates the Seq property in the dataItem.

When I call the dataSource.sync method, all the dataItems are pushed to the service to be updated.

I would like to send/push the single dataItem to the service which was re-ordered instead of sending all the dataItems.

I checked the dirty property and set it to true for the dataItem which I wanted to update. It did not work.

Post updates and calculations on the server, the grid dataSource will be refreshed.

Any help is appreciated.

 

Thanks

Dimitar
Telerik team
 answered on 14 Apr 2017
4 answers
3.0K+ views

Hello 

I'm pretty sure I'm doing something wrong but I just don't see what. Any file upload runs into an error but doesn't say what the problem is. I'm using this code based on your documentation:

$("#selectfile").kendoUpload({
    async: {
        saveUrl: "http://localhost/geoneers/gallery/image",
        removeUrl: "http://localhost/geoneers/save"
    },
    dropZone: ".dropfile",
    error: function (e) {
        var files = e.files;
 
        if (e.operation == "upload") {
            console.log (e);
            alert("Failed to upload " + files.length + " files");
        }
    },
    success: function(e) {
        alert ("success");
    }
});

 

It always runs into the error event showing me that all is fine (console.log(e); -> see attachment e_output). Beside of that kendo.all.js (line 2096) gives this output in into the console: 

[Log] Server response: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> (kendo.all.min.js, line 25)
<html>
 <head>
  <title>Index of /geoneers/gallery/image</title>
 </head>
 <body>
<h1>Index of /geoneers/gallery/image</h1>
<ul><li><a href="/geoneers/gallery/"> Parent Directory</a></li>
</ul>
</body></html>

I have not clue whats going wrong here. I'm working an a Mac and working with Mamp Pro (latest version). To get rid off the error I tried the following as well:

- Updated to the latest version of Kendoui Pro 
- Made sure the path is set to chmod 777

Wether I use "Select file..." or dropzone it always comes to this behaviour and the file is not uploaded.

Any ideas why?

Regards

 

 

 

Tayger
Top achievements
Rank 1
Iron
Iron
 answered on 14 Apr 2017
2 answers
87 views

Hi,
after I add a new record with "Add new record", typing "Joh", selecting an entry and click on another element (editor lost focus) the resulting displayed entry is [object Object], but I am expecting that "John Doe" is displayed.
I think I am missing something in the configuration to seeing the selected item. But I don't know whats wrong.

Small test environment is here: http://dojo.telerik.com/iQEqI

Thanks for help

Normen

Normen
Top achievements
Rank 1
 answered on 13 Apr 2017
8 answers
162 views
Hello,

How can change the title of the total (last rows) of the pivot grid?

In the image attached we can see I want to change with  mark in red.

thanks.
Viktor Tachev
Telerik team
 answered on 13 Apr 2017
1 answer
160 views

I want to initialize a date picker inside a bound view with week numbers like this:

<input name="Deadline" data-bind="value: deadline" data-role="datepicker" data-week-number="true" />

However week numbers wont be displayed. Is this a bug? Here is a dojo link

http://dojo.telerik.com/Ogoyu/2

I cannot use jQuery initialization as I need that binding.

Milena
Telerik team
 answered on 13 Apr 2017
1 answer
182 views

I have disabled Add and Delete always .. But after postback of the page . The options are automatically enabled on rightclick

 

This is my code : 

 

function detailInitKendoCostGrid(e) {
    if (e.data.Id > 0) {
        var ds = new kendo.data.DataSource({
            schema: {
                id: "jobCodeID",
                data: "d",
                total: "d.length",
                model: {
                    fields: {
                        Cost: { type: "string" },
                        Total: { type: "string" },
                        Desc: { type: "string" },
                        Quantity: { type: "string" },
                  }
                }
            },
            pageSize: 500,
            transport: {
                read: {
                    url: "Cost.aspx/CostPart",
                    contentType: "application/json; charset=utf-8",
                    dataType: 'JSON',
                    type: "POST",
                    complete: function (jqXhr, textStatus) {
                        if (textStatus === 'error') {
                            var message = $.parseJSON(jqXhr.responseText).Message;
                            ShowMessageDialog(message);
                        }
                    }
                },
                parameterMap: function (options, operation) {
                    // ////
                    switch (operation) {
                        case "read":
                            return JSON.stringify({
                                "jobcodeId": e.data.Id,
                            });
                            break;
                        default:
                            return JSON.stringify(options);
                            break;
                    }
                }
            }
        });
        $("<div style='height: 400px'/>").appendTo(e.detailCell).kendoGrid({
            dataSource: ds,
            columns: [
                { field: "Cost", title: "Task", width: "500px" },
                { field: "Total", title: " Part Number", width: "100px" },
                { field: "Desc", title: "Part Description", width: "100px" },
                { field: "Quantity", title: "Quantity", width: "100px" },
               
            ],
              selectable: true
        });
    }
}
function SetContextMenuforCost()
{
    var taskPartGridId = "#Kendo_CostGrid";
    $("#E_ContextMenu").kendoContextMenu({
        dataSource: [{ text: "Add Cost" },
                     { text: "Edit Cost" },
                      { text: "Delete Cost" }],
        target: CostGridId,
        filter: ".k-detail-row tbody tr.k-state-selected[role='row']",
        open: function (e) {
            showopen(e);
        },
        select: function (e) {
            ShowGridPopup(e);
        },
    });
      $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(1)", true);
            $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(0)", false);
            $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(2)", false);
}
function showopen(e) {
    var menu = e.sender;
    if (menu != null) {
        var total= e.target.childNodes[3].textContent;
           if (quantity > 0) {
            $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(1)", true);
            $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(0)", false);
            $("#E_ContextMenu").kendoMenu().data("kendoMenu").enable("li:eq(2)", false);
        }
    }
}

Ivan Danchev
Telerik team
 answered on 13 Apr 2017
1 answer
143 views

Hi,

I have a grid with multiple gauges inside of it. The gauges represent measure values. Because the measures changes in real time I have to constantly reload the gauges with the new measures.Also, the user can decide that it doesn't want to display a specific measure, I have to reload them in this case too. 

So the only way that I found to do this is to create all my gauges and destroy them once I get the new measures values or when the user decide he doesn't want a measure anymore.

The problem is that I have a lot of memory leaks while doing this process again and again.

I manage to reproduce the bug on kendo dojo using random data (same behavior as my code)

memory leak dojo code

is there a way to avoid all that memory leaks.

ps : I use google chrome (use More tools>task manager  too see how many kb a tab is using)

Any help will be appreciated

Stamo Gochev
Telerik team
 answered on 13 Apr 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
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
+? 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?