Telerik Forums
Kendo UI for jQuery Forum
3 answers
357 views
Is it possible to have onLabel and offLabel that is longer than three characters?  I'm using the mobile switch on a web page with the silver theme and it appears that if I make the labels more than three characters it bleeds over into the other label.  Try it out yourself click on the "Edit this sample" button here http://demos.telerik.com/kendo-ui/switch/adaptive and change the onLabel or offLabel to "XXXXXXXX" or something long and you will see what I'm talking about.  What I'm trying to accomplish is to get rid of the corresponding labels that you would put next to the control and just show that toggled text in the control itself.  For example I want a switch with the onLabel="Edit Mode" and offLabel="View Mode".
Stefan
Telerik team
 answered on 08 Feb 2018
1 answer
738 views

below is the kendo grid which is not calling the mentioned action/controller on page load hence the data to the grid is empty..

HTML Code

<div class="container-fluid">
        <div class="row">
            <div class="col-xs-18 col-md-12">
                @(Html.Kendo().Grid<abcxksdkd.Models.DisplayUserModel>
            ()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(p => p.UserName).Filterable(false);
                columns.Bound(p => p.UserRole);
                columns.Bound(p => p.Email);
                columns.Bound(p => p.isLocked);
            })
            .Pageable()
            .Sortable()
            .Scrollable()
            .Filterable()
            .HtmlAttributes(new { style = "height:550px;" })
            .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Read(read => read.Action("Orders_Read", "Admin"))
            )
                )
            </div>
        </div>
    </div>

 

CONTROLLER CODE

 

public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
        {
            Model user = new Model();
           
            foreach (var a in DbContext.Users)
            {
                user.UserName = a.Name;
                user.UserRole = Roles.ToString();
                user.isLocked = a.Lockout;
                user.Email = a.mail;
            }
            var result = Enumerable.Range(0, 10).Select(i => new Model
            {
                UserName = user.UserName,
                Email = user.Email,
                isLocked = user.isLocked,
                UserRole = user.UserRole
            });
            return Json(result.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }

Stefan
Telerik team
 answered on 08 Feb 2018
1 answer
98 views

Hi,

we have been building an SPA using Vue2 that also will be serves as mobile application (wrapped using Cordova). we need Grouped list item with fixed group header (exactly the same functionality as Mobile Listview - Fixed Header). AFAIK i cannot achieve that using Kendo Listview Vue Wrapper.

is it possible to use Kendo Mobile UI especially Mobile ListView inside of Vue application, because i cannot find any reference about this in telerik documentation & the forum.

Plamen
Telerik team
 answered on 07 Feb 2018
4 answers
1.4K+ views

Hi,

I have an issue with dropdownlist, with run twice the databound (read action)

In my case, I customized the dropdownlist to manage the pagination :

 

Html.Kendo().DropDownList()
        .Name(Model.ElementId)
        .DataTextField(Model.LovTextField.Name)
        .DataValueField(Model.LovField.Name)
        .Value(Model.Value.ToString())
        .IgnoreCase(Model.SearchIgnoreCase)
        .Enable(Model.IsEnabled)
        .Animation(false)
        .AutoWidth(true)
        .Template(Model.ClientTemplate)
        .ValueTemplate(Model.ClientTemplate)
        .DataSource(source =>
        {
            source.Custom()
                .ServerFiltering(true)
                .ServerPaging(true)
                .PageSize(50)
                .Type("aspnetmvc-ajax")
                .Transport(transport =>
                {
                    transport.Read("ReadLovData", "DropDownList", new { area = "Runtime", pageid = ViewBag.PageContext.PageId, elementid = Model.ElementId });
                })
                .Schema(schema =>
                {
                    schema.Data("Data") //define the [data](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.data) option
                        .Total("Total"); //define the [total](http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.total) option
                }).Events(e => e.RequestEnd(@<text>function(e) {requestEnd(e,"@Model.ElementId");}</text>));
        })
        .Virtual(v =>
        {
            v.ValueMapper("dropDownListValueMapper")
                .MapValueTo("dataItem");
        })
        .FooterTemplate("<span class='k-state-hover'>Page #: instance.dataSource.page() # / #: instance.dataSource.totalPages() # - Total #: instance.dataSource.total() # items found</span>")

        

dropDownListValueMapper is a javascript function that calls an controller/action via ajax in POST mode

requestEnd is a javascript function that that does nothing in this case 

 

In the attached file, I have an example of a page with 3 dropdownlists; and we see for each of them the call of a second databound, just before the call of the valuemapper

 

Like you can see, we are in ASP.NET MVC, and I'm not  good enough in javascript to replicate an example on dojo (especially in server mode)

I also noticed that the example on databound customization did not work properly (https://demos.telerik.com/aspnet-mvc/dropdownlist/custom-datasource), but with the example provided with the DLL it works locally. However there is no valuemapper, so ... 

Note that I just went to the latest version (2018-R1), and I use Visual Studio 2015 (C#)

   

Thanks,

Thierry

 

 

 
Dimitar
Telerik team
 answered on 06 Feb 2018
1 answer
56 views
How to create and change the chart type in run time. Example: I have a pie chart and I want to switch to columns.
The data call I already have. I just want to set the correct properties so that the chart is displayed correctly.
I'm using Angular JS.
Preslav
Telerik team
 answered on 06 Feb 2018
1 answer
166 views
How to create and change the chart type in run time. Example: I have a pie chart and I want to switch to columns.
The data call I already have. I just want to set the correct properties so that the chart is displayed correctly.
I'm using Angular JS.
Preslav
Telerik team
 answered on 06 Feb 2018
4 answers
346 views
When I launch the image browser from an Editor the image seems to load up properly, however when I launch the image browser from "Inline Editing" all I get is a list of undefined objects.

I am using version 2013.2.918. Here is the code I am using to instantiate the editors:

Inline Editing Version:
$(document).ready(function () {
    $(".rich-text").kendoEditor({
        encoded: false,
        tools: [
            "bold",
            "italic",
            "underline",
            "insertImage"
        ],
        imageBrowser: {
            path: "/",
            transport: {
                read: "/cms/imagebrowser/read",
                destroy: "/cms/imagebrowser/destroy",
                create: "/cms/imagebrowser/create",
                thumbnailUrl: "/cms/imagebrowser/thumbnail",
                uploadUrl: "/cms/imagebrowser/upload",
                imageUrl: "/content/cms/images/{0}"
            }
        }
    });
});
Editor Version in my CMS:
@model string
 
@(Html.Kendo().EditorFor(m => m)
    .Encode(false)
    .Tools(tools => tools
          .Clear()
          .Bold().Italic().Underline().Strikethrough()
          .JustifyLeft().JustifyCenter().JustifyRight().JustifyFull()
          .InsertUnorderedList().InsertOrderedList()
          .Outdent().Indent()
          .CreateLink().Unlink()
          .InsertImage()
          .SubScript()
          .SuperScript()
          .TableEditing()
          .ViewHtml()
          .Formatting()
          .FontName()
          .FontSize()
          .FontColor().BackColor()
    )
    .ImageBrowser(imageBrowser => imageBrowser
        .Image("~/content/cms/images/{0}")
        .Read("read", "imagebrowser", new { Area = "cms" })
        .Create("create", "imagebrowser", new { Area = "cms" })
        .Destroy("destroy", "imagebrowser", new { Area = "cms" })
        .Upload("upload", "imagebrowser", new { Area = "cms" })
        .Thumbnail("thumbnail", "imagebrowser", new { Area = "cms" })
    )
)
Can anyone tell me why these two methods would give different results? I've attached screenshots.

Using fiddler both methods make the same exact web request and get the same exact json response.
Dimitar
Telerik team
 answered on 05 Feb 2018
1 answer
96 views

Hello,

We noticed that when we when we click 'More formats..' in the format's list, the modal window opens twice. The issue can be reproduced here https://demos.telerik.com/kendo-ui/spreadsheet/index. Is this a known issue?

Also, is it best to post hese here or directly on the github repo's issue list.

 

Thanks! 

Gabriel

Neli
Telerik team
 answered on 05 Feb 2018
1 answer
134 views

Hello,

 

I'm trying to disabled the cell after I loaded Data but I failed.

What should I do to achieve my need?

Some action I already tried below:

1.

$(function() {
    $("#spreadsheet").kendoSpreadsheet({
    });
    spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
     $.getJSON("<%=request.getContextPath()%>/data.json")
     .done(function (sheets) {
         spreadsheet.fromJSON( sheets);
     });
     var rangeChange = spreadsheet.activeSheet().range("A1:H9");
    rangeChange.enable(false);
});

2.

add the attribute : "enable" : "false" to JSON Data.

Ivan Danchev
Telerik team
 answered on 05 Feb 2018
1 answer
200 views
Reproduce: 
Go to https://demos.telerik.com/kendo-ui/spreadsheet/index with mobile device and try to scroll sheet columns

Question: 
Is there any way to enable scrolling on spreadsheet for mobile devices?
Ivan Danchev
Telerik team
 answered on 05 Feb 2018
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?