Telerik Forums
Kendo UI for jQuery Forum
1 answer
283 views

Hi,

We have added scheduler in partial view with kendo ui js. (All scheduler js are in partial view as we need to use this common view in many pages.)

On main page, we have used jquery load method (for loading the partial view) on click on button.

It loads the control perfectly fine.  It also displays the event.

But when we try to add\edit\delete operation, we are getting error.

VM2284:113 Uncaught TypeError: c.ui.validator.validateOnInit is not a function
    at init._validateOnInit (<anonymous>:113:9440)
    at new init (<anonymous>:113:7213)
    at init.refresh (<anonymous>:265:11880)
    at new init (<anonymous>:265:9159)
    at HTMLDivElement.<anonymous> (<anonymous>:30:5608)
    at Function.each (masterpagejs?v=UucszGsF6c2MewgvGCU79DYX2aiYoO5WtG8R6tBh_k81:1)
    at R.fn.init.each (masterpagejs?v=UucszGsF6c2MewgvGCU79DYX2aiYoO5WtG8R6tBh_k81:1)
    at R.fn.init.e.fn.<computed> [as kendoEditable] (<anonymous>:30:5582)
    at r.editEvent (<anonymous>:556:21652)
    at init._createPopupEditor (<anonymous>:563:18759)

 

 

Neli
Telerik team
 answered on 05 Jan 2021
2 answers
276 views

I am having an issue with the display of folders in the FileManager on initial load. If I use a local data source, everything works fine.(see Capture_local.png)

Here is an example of my local datasource:

var data = [
        {        
"name": "Training1",
"size": 0,
"path": "Training1",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training2",
"size": 0,
"path": "Training2",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
},
{
"name": "Training3",
"size": 0,
"path": "Training3",
"extension": "",
"isDirectory": true,
"hasDirectories": false,
"created": "2020-12-28T18:49:36.644558Z",
"modified": "2020-12-28T18:49:36.644584Z",
"createdUtc": "2020-12-28T18:49:36.644606Z",
"modifiedUtc": "2020-12-28T18:49:36.644628Z"
}
      ];

If I set the FileManager to use a remote datasource, I am getting NaN showing in the name column. (see Capture_remote.png)

The remote datasource returns the same as above.

 

Here is my FileManager config:

var filemanager = $("#fileManager").kendoFileManager({
     dataSource: filemanagerDataSource,
     height:600,
     initialView: 'grid',
     contextMenu: false,
     toolbar: {
       items: [
        { name: "sortDirection" }filemanagerDataSource,
        { name: "changeView" },
        { name: "spacer" },
        { name: "details" },
        { name: "search" }
        ]
     },
     views: {
       grid: {
         noRecords: true,
       }
     }
}).data('kendoFileManager');

 

I can set the FileManager demo (using kendo dojo) to use the grid view on initial load and it seems to work fine, so I'm not sure what may be causing the issue. Any help would be appreciated. Please let me know if more info is needed.

Thank you.

Alan
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
2 answers
502 views

The navigate method lets us select a folder by name. Is there a way to always select the first folder listed; by some sort of index maybe? 

 

Alan
Top achievements
Rank 1
Veteran
 answered on 04 Jan 2021
5 answers
1.2K+ views
How can I hide the last column of my grid having action elements while doing a pdf export.I want to override the css for pdf export so as when the grid is exported the last column is hidden in the pdf. I also have a requirement wherein I want to show the last column in the exported pdf as that grid contains data instead of action elements.Thanks
Alex Hajigeorgieva
Telerik team
 answered on 31 Dec 2020
3 answers
649 views
Hi Team,
     I'm trying to override the some of the keyboard shortcuts for kendo grid.
What I need is to make the pageup/pagedown for top/bottom of screen and use home/end keys for start/end of dataset. Can you please suggest on how can I achieve this?
Sibin
Top achievements
Rank 1
 answered on 31 Dec 2020
10 answers
895 views

I have a grid that uses inline editing. There are also many pages of data, and I noticed that if I sort by any column, then click the "Add new record" button, I don't see the new row appear (I assume it is created at the end of the last page). However when I go to the last page, the row is already created, except it is all blank! I have some required fields that the user needs to fill in before creating the row, but in this situation, the row is created by itself without any values. This blank row only appears on the frontend (doesn't do anything serverside), and clicking "Update" then "Cancel" removes the row from the table...

Preferably, I would like to be able to jump to the page that contains the created row so that the user doesn't have to go looking for a blank row if they try inserting while the grid is sorted.

Thanks

 

Aleksandar
Telerik team
 answered on 31 Dec 2020
3 answers
388 views

I have a spreadsheet with some formula (es. =A1*B2/5).

So I get the Json data and I see that something like that

{
      "name": "Sheet1",
      "rows": [
        {
          "index": 31,
          "cells": [
            {
              "value": 5,
              "format": "#",
              "index": 1
            },
            {
              "value": 10,
              "formula": "B32*2",
              "index": 2
            }
          ]
        }

is it possibile to use the js to get the calulated data or exist a .net dll to convert js"excel" style formula to data?

Veselin Tsvetanov
Telerik team
 answered on 30 Dec 2020
2 answers
1.2K+ views

I am trying to use async chunk upload with Web API 2.
But always after first chunk I am receiving message “Cannot read property 'chunkIndex' of undefined”.
What did I do wrong?

 

using System;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Web;
using System.Web.Hosting;
using System.Web.Http;
 
namespace UploadWebApi.Controllers
{
    public class UploadController : ApiController
    {
        [DataContract]
        public class ChunkMetaData
        {
            [DataMember(Name = "uploadUid")]
            public string UploadUid { get; set; }
            [DataMember(Name = "fileName")]
            public string FileName { get; set; }
            [DataMember(Name = "contentType")]
            public string ContentType { get; set; }
            [DataMember(Name = "chunkIndex")]
            public long ChunkIndex { get; set; }
            [DataMember(Name = "totalChunks")]
            public long TotalChunks { get; set; }
            [DataMember(Name = "totalFileSize")]
            public long TotalFileSize { get; set; }
        }
 
        public class FileResult
        {
            public bool Uploaded { get; set; }
            public string FileUid { get; set; }
        }
 
        public class Files
        {
            public string Extension { get; set; }
            public string Name { get; set; }
            public int Size { get; set; }
            public string Uid { get; set; }
        }
 
        public IHttpActionResult Save(HttpFileCollection files)
        {
            string path = String.Empty;
            if (files != null)
            {
                for (var i = 0; i < files.Count; i++)
                {
                    path = Path.Combine(HostingEnvironment.MapPath("~/App_Data"), files[i].FileName);
                    files[i].SaveAs(path);
                }
            }
            return Ok("");
        }
 
        public IHttpActionResult Remove(string[] fileNames)
        {
            if (fileNames != null)
            {
                foreach (var fullName in fileNames)
                {
                    var fileName = Path.GetFileName(fullName);
                    var physicalPath = Path.Combine(HostingEnvironment.MapPath("~/App_Data"), fileName);
                    if (File.Exists(physicalPath))
                    {
                        File.Delete(physicalPath);
                    }
                }
            }
            return Ok("");
        }
 
        public void AppendToFile(string fullPath, Stream content)
        {
            try
            {
                using (FileStream stream = new FileStream(fullPath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite))
                {
                    using (content)
                    {
                        content.CopyTo(stream);
                    }
                }
            }
            catch (IOException ex)
            {
                throw ex;
            }
        }
 
        public IHttpActionResult ChunkSave()
        {
            var files = HttpContext.Current.Request.Files;
            var metaData = HttpContext.Current.Request.Form["metadata"];
            if (metaData == null)
            {
                return Save(files);
            }
            MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(metaData));
            var serializer = new DataContractJsonSerializer(typeof(ChunkMetaData));
            ChunkMetaData somemetaData = serializer.ReadObject(ms) as ChunkMetaData;
            string path = String.Empty;
            if (files != null)
            {
                for (var i = 0; i < files.Count; i++)
                {
                    path = Path.Combine(HostingEnvironment.MapPath("~/App_Data"), somemetaData.FileName);
                    AppendToFile(path, files[i].InputStream);
                }
            }
            FileResult fileBlob = new FileResult();
            fileBlob.Uploaded = somemetaData.TotalChunks - 1 <= somemetaData.ChunkIndex;
            fileBlob.FileUid = somemetaData.UploadUid;
            return Json(fileBlob);
        }
    }
}
Alexander
Top achievements
Rank 2
 answered on 30 Dec 2020
1 answer
263 views

We've used the NPM/Bower/gulp method of making custom Kendo JS packages for our webapp and ran into a problem (using 2020.3.1118). Your build system doesn't seem to like Node.js v12? You are specifying gulp 3.9.1 in  src/package.json, which is no longer supported, and which breaks under Node.js v12.  I had to install Node v10 again to get it to work.  If you are broken under node 12+, it would be nice to have that mentioned in your documentation, for instance here: https://docs.telerik.com/kendo-ui/intro/installation/what-you-need

Will you be updating the custom build system so that it works under recent Node.js versions? 

Misho
Telerik team
 answered on 30 Dec 2020
9 answers
1.7K+ views
Hi,

Is it possible to close the window when the user clicks somewhere outside the window (which is not modal)?

Thanks,
David A.
Martin
Telerik team
 answered on 30 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?