Telerik Forums
Kendo UI for jQuery Forum
1 answer
91 views

Hello 

I'm pretty new to KendoUI Upload. I made some examples that are working fine. I have an issue on used language around file upload: The Button text is set to "Select file..." and any process is set to English ("done", etc.). I have set the culture to a different language than English:

<script src="telerik/js/cultures/kendo.culture.de-CH.min.js"></script>
...
kendo.culture("de-CH")
...

 

Shouldn't the text around the file uploaded not switch to it? I would expect German text based on this settings. 

And further more a question: Is it possible to use ONE file uploader for all allowed file types but with different file size definitions? Something like this:

validation: {
allowedExtensions: ['.gif', '.jpg', '.png', '.mp3', '.mp4']
}

and then to differ those for maxFileSize within the ONE file uploader:
.gif, .jpg, .png: max 1MB
.mp3 : max 5MB
.mp4: max 20MB

Regards

 

 

 

 

Tayger
Top achievements
Rank 1
Iron
 answered on 11 Apr 2017
2 answers
1.6K+ views

I have a grid in an MVC environment. I have my filterable properties set up as follows:

          .Filterable(filterable => filterable
                .Extra(false)
                .Operators(operators => operators
                    .ForString(str => str.Clear()
                        .StartsWith("Starts with")
                        .IsEqualTo("Equal to")
                        .IsNotEqualTo("Not equal to")
                        .Contains("Contains")
                    )
                    .ForNumber(number => number.Clear()
                        .IsEqualTo("Equal to")
                        .IsNotEqualTo("Not equal to")
                        .IsGreaterThanOrEqualTo("Greater than or equal to")
                        .IsLessThanOrEqualTo("Less than or equal to")
                        .IsGreaterThan("Greater than")
                        .IsLessThan("Less than")
                    )
                    .ForDate(date => date.Clear()
                        .IsEqualTo("Equal to")
                        .IsNotEqualTo("Not equal to")
                        .IsGreaterThanOrEqualTo("Greater than or equal to")
                        .IsLessThanOrEqualTo("Less than or equal to")
                        .IsGreaterThan("Greater than")
                        .IsLessThan("Less than")
                    )
                )
            )

 

I have two questions:

1) I have a column in my grid that I do not want filterable. How do I exclude just that one column?

2) I am using these same filterable operators on all my grids in my app. Is there some way I can avoid repeating all this code for each grid and just provide some sort of reference to these defined operator values?

Randy
Top achievements
Rank 1
 answered on 11 Apr 2017
1 answer
114 views

I have a grid that works perfectly using the MVC wrapper. However, I'm trying to implement the same grid using JavaScript and am running into an odd issue. Here is my JavaScript code, and my MVC controller method it's calling:

function setupGrid() {
    var dataSource = new kendo.data.DataSource({
        dataType: "json",
        type: "GET",
        pageSize: 25,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true,
        transport: {
            read: '/Closeout/ReadCloseoutHistory/'
        },
        schema: {
            data: "Data",
            model: {
                fields: {
                    CloseoutDate: { type: "datetime" },
                    BeginDate: { type: "datetime" },
                    EndDate: { type: "datetime" }
                }
            }
        },
    });

    $("#gridDiv").kendoGrid({
        name: "grid",
        dataSource: dataSource,
        sortable: true,
        error: function(e) {
            gridErrorHandler();
        },
        toolbar: ["excel", "pdf"],
        scrollable: {
            virtual: true
        },
        mobile: true,
        resizeable: true,
        reorderable: true,
        columnMenu: true,
        filterable: {
            extra: false,
            operators: {
                string: {
                    startswith: "Starts with",
                    contains: "Contains",
                    eq: "Equal to",
                    neq: "Not equal to",
                    gte: "Greater than or equal to",
                    lte: "Less than or equal to"
                }
            }
        },
        pdf: {
            allPages: true,
            paperSize: "A4",
            landscape: true,
            avoidLinks: true,
            scale: 0.6,
            repeatHeaders: true,
            templateId: "page-template",
            fileName: "CloseoutHistory.pdf",
            margin: {top: "2cm", right: "1cm", bottom: "1cm", left: "1cm"},
        },
        excel: {
            fileName: "CloseoutHistory.xlsx",
            proxyURL: "Customer/ExcelExport",
            filterable: true
        },
        columns: [{
            field: "CloseoutDate",
            title: "Closeout Date",
            width: 100
        }, {
            field: "BeginDate",
            title: "Begin Date",
            width: 100
        }, {
            field: "EndDate",
            title: "End Date",
            width: 150
        }]
    });
};

 

Controller code:

       public ActionResult ReadCloseoutHistory([DataSourceRequest] Kendo.Mvc.UI.DataSourceRequest request)
        {
            try
            {
                var resultSet = this.CloseoutData.GetList(this.GetClientId()).ToDataSourceResult(request);
                return Json(resultSet, JsonRequestBehavior.AllowGet);
            }
            catch (Exception exception)
            {
                ...
            }
        }

 

The MVC version of the grid works as expected. The JavaScript version generates a server error of 500. The controller method is getting called and seems to return ok. However, something is causing a 500 (internal server) error. I also get a "Maximum call stack size exceeded" error from kendo.mobile.min.js.

Can you see anything wrong with my JavaScript implementation?

Boyan Dimitrov
Telerik team
 answered on 11 Apr 2017
3 answers
133 views

Hi,

Unfortunately I'm not able to run angular code with inside a custom scheduler template.

Here's what I'm trying to do:

I'm binding the scheduler component with my controller to a HTML element.

$scope.init = function () {
  $("#scheduler").kendoScheduler({
      date: new Date(),
      selectable: true,
      height: $('cg-contentviewer > div').innerHeight() -68,
      views: [
          "day",
          { type: "workWeek", selected: true },
          "week",
          "month",
          "agenda",
          { type: "timeline", eventHeight: 50}
      ],
      timezone: "Etc/UTC",
      editable: {
          template: kendo.template($("#customEventModal").html()),
      },
      eventTemplate: kendo.template($("#customEventModal").html()),
      dataSource: {
          batch: true,
          transport: {
              read: function(options) {
                  $apiplanings.getPlaningItemsForUser({id : $rootScope.profile.id}).$promise.then(function (response){
                      options.success(response);
                  },function errorCallback(response) {
 
                  });
              },
              update: function(options) {
 
              },
              create: function(options){
 
              },
              destroy: function(options){
 
              },
              parameterMap: function(options, operation) {
                  if (operation !== "read" && options.models) {
                      return {models: kendo.stringify(options.models)};
                  }
              }
          },
          schema: {
              model: {
                  id: "id",
                  fields: {
                      ID: { from: "id", type: "number" },
                      taskId: { from: "id", type: "number" },
                      title: { from: "title", defaultValue: "No title", validation: { required: true } },
                      start: { type: "date", from: "planedfrom" },
                      end: { type: "date", from: "planedto" },
                      description: { from: "description" },
                      ownerId: { from: "createUserId" },
                      isAllDay: { type: "boolean", field: "IsAllDay", default: false }
                  }
              }
          }
      
  });     
Ianko
Telerik team
 answered on 11 Apr 2017
5 answers
340 views

Hi,

How can a template overflow in a toolbar?

In http://demos.telerik.com/kendo-ui/toolbar/index  I change

{
    template: "<input id='dropdown' style='width: 150px;' />",
    overflow: "never"
},

to

{
    template: "<input id='dropdown' style='width: 150px;' />",
    overflow: "always"
},

but the dropdownlist doesn't overflow.

Peter

Ianko
Telerik team
 answered on 11 Apr 2017
1 answer
148 views

I have a grid that appears as follows in the attachment. You can see that the column menu icons are not consistent. When a column header comprises more than one line, the icon appears on the first line. In other words, not all the icons appear at the same level or line. This looks pretty bad and unprofessional. Is there something I can do to fix this (other than you telling me not to allow column headers to wrap)?

 

Orlin
Telerik team
 answered on 11 Apr 2017
2 answers
86 views

The following Dojo example shows what I'm trying to

http://dojo.telerik.com/@pnd@qad.com/oYIXU/5

I'm trying to create a modal window with a select widget and trying to populate the option dynamically.   I'm getting that the downtimeWin.content is undefined.  I'm really struggling to get the data onto the screen - any help would be greatly appreciated.

So in the Dojo, if you click the downtime button, I would expect that the window would popup and would have the values that were defined in the window ready function.

Pavlina
Telerik team
 answered on 10 Apr 2017
1 answer
112 views

I would like to add some functions to Spreadsheet that fetch data from the server, e.g.
=numberOfUsers()

this should call: GET /api/numberOfUsers

and display the returned date.

Is this possible and if yes, how?

Thank you & Regards,

Bert

Bert
Top achievements
Rank 1
 answered on 10 Apr 2017
3 answers
438 views

 This is my first question on kendo ui grid, we are using kendo ui grid on mobile device.

I have trouble to make it support both multiple selection and scrolling.

It has grid setup with

selectable: "multiple, row",

pageable: false

navigatable: false

 

As a user, I would expect user to touch scroll the grid, rather than select and stop scrolling, which made it unusable.

Is there any way to configure it to support multiple selection and scrolling at the same time?

- click to select and unselect

- scrolling when touch and move

- not keyboard in this case

Thanks in advance.

 

Viktor Tachev
Telerik team
 answered on 10 Apr 2017
3 answers
140 views

 Hi, 

 The first week of January is looking to be 2, not 1. What can  be the explanation? 

 

Regards, 

   Cristina

 

 

 

 

Boyan Dimitrov
Telerik team
 answered on 10 Apr 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?