Telerik Forums
Kendo UI for jQuery Forum
15 answers
215 views
I have a Macbook with El Capitan and MS Word 2011. When I try to copy text from word doc by doing command C and command V, it paste the text as an image automatically so I have to do "Paste and Match Style". It only happens on Chrome and not on Firefox. Is there a way to simply paste as text and not as image?
Kaoru
Top achievements
Rank 1
 answered on 11 Oct 2017
2 answers
359 views

Hi,

Currently the scheduler has Clone Events to demonstrates how to clone events in the Scheduler. But how we can copy and paste an event on scheduler.

Regards.

Ivan Danchev
Telerik team
 answered on 11 Oct 2017
2 answers
109 views
I'd like to create a noRecords template for my grid with mvvm.

noRecords: {
   template: "nessun elemento"
 },

This is my kendo grid with mvvm.

<div id="a"
data-role="grid"
data-no-records="templateNoRecords"
    data-columns="[
                { 'title': 'ID', 'field': 'id'  },

    { 'title': 'ID', 'field': 'id'  }

        ]"
 data-bind="source: products.source,">
<script id="templateNoRecords" name="templateNoRecords" type="text/x-kendo-template">
      Nessun dato trovato
</script>
Preslav
Telerik team
 answered on 11 Oct 2017
1 answer
125 views
noRecords: {
    template: "nessun elemento"
  }

 

I'd like to do this but with mvvm.

This is my kendo grid:

 

               <div id="a"
                   data-role="grid"
                   data-no-records="templateNoRecords"
                   data-columns="[
                                { 'title': 'ID', 'field': 'id' ,hidden: true },
                           { 'title': 'Nome', 'field': 'nome' },
                    ]"
                   data-bind="source: products.source}">
               <script id="templateNoRecords" name="templateNoRecords" type="text/x-kendo-template">
                   Nessun dato trovato
               </script>
            </div>

 

Preslav
Telerik team
 answered on 11 Oct 2017
1 answer
325 views

I have this code:

kendo.ui.Grid.prototype.options =  
$.extend(true, kendo.ui.Grid.prototype.options,{
        noDataTemplate:"NoData",
        noRecordsTemplate:"NoData",
        noRecords:"NoData"  
});

this code doesn't work!

 

 

Dimitar
Telerik team
 answered on 11 Oct 2017
7 answers
1.3K+ views
Hello,
           I have ASP.NET MVC project. There is a view which we have done in kendo MVVM .there are MVVM dropdown, grid, autocomplete.etc. On document.ready() there is alert that have kept. 
          Now when load the MVVM page,  get  when close the window and open again, get 2 alerts .. and it multiplies when close and reopen  view until page refresh from . What is the solution to this?
Nencho
Telerik team
 answered on 11 Oct 2017
3 answers
96 views

There is a bug in the following scenario:

1. Go to the following example: http://dojo.telerik.com/AWihI/2

2. Sort by ProductName

3. Go to the last page

4. Click "Add New Record". It does not show the new row at the bottom of the current page.

While if you do the following scenario, it works:

1. Go to the following example: http://dojo.telerik.com/AWihI/2

2. Go to the last page

3. Click "Add New Record". It shows the new row at the bottom of the current page

Konstantin Dikov
Telerik team
 answered on 11 Oct 2017
3 answers
137 views

i have external localization file for dropdownlist.

/* DropDownList messages */

if (kendo.ui.DropDownList) {
kendo.ui.DropDownList.prototype.options.messages =
$.extend(true, kendo.ui.DropDownList.prototype.options.messages,{
  "<message-name>": "<translation",
  noDataFound:"ciao"
});
}

 

noDataFuond is definitely wrong.

What should I write to set the no-data parameter of dropdownlist? 

Then i used the template to set this properties, but now i'd like to create external file for this message.

Dimitar
Telerik team
 answered on 11 Oct 2017
1 answer
390 views

At the first rendering of a page I would like to specify and process the selection of a default autocomplete value.  I thought this code might work, it doesn't:

$(document).ready(function () {
    var ac = $("#autoComplete").data("kendoAutoComplete");
    var target = "170035";
    ac.search(target)
        .then(ac.select(target))
        .then(ac.trigger("change"))
     ;
})

AutoComplete search() does not return a promise. A promise would be needed for the .then() chaining I want to do.  For comparison, DataSource read() does return a promise and can be part of a chain.

Q: Can you suggest a different approach for search and select ?

Thanks, Richard

 

Nencho
Telerik team
 answered on 11 Oct 2017
2 answers
593 views

I have a model with two field (Code and Item). The Code is set to auto increment and the Item is a required field. When I clicked the Add New Record button, the Code column was set to 0 in the Popup. After I add a new record, the Code field in the grid was set to 0 even I return the model with the new record. 

 

Model:

public partial class HousenMokutekiD
    {
        public int Code { get; set; }

        [Required]
        [StringLength(20, MinimumLength = 3)]
        public string Item { get; set; }
    }

Controller:

public ActionResult Create([DataSourceRequest]DataSourceRequest request, HousenMokutekiD model)
        {
            if (string.IsNullOrWhiteSpace(model.Item))
            {
                ModelState.AddModelError("", "Item is required.");
            }

            if (model != null && ModelState.IsValid)
            {
                var entity = new HousenMokutekiD();

                if (model.Item != null)
                {
                    entity.Item = model.Item;
                }

                _context.HousenMokutekiD.Add(entity);
                _context.SaveChanges();

                model.Code = entity.Code;
                model.Item = entity.Item;                
            }
            return Json(new[] { model }.ToDataSourceResult(request, ModelState));
        }

Razor:

@model IEnumerable<Sms.Office.Data.PmsDd.Models.HousenMokutekiD>

@(Html.Kendo().Grid(Model)
            .Name("grid")
            .Columns(columns =>
            {
                columns.Command(command =>
                {
                    command.Edit().UpdateText("Save Changes");
                    command.Destroy();
                }).Width(162);
                columns.Bound(p => p.Code);
                columns.Bound(p => p.Item);
            })
            .ToolBar(add =>
            {
                add.Create();
            })
            .Editable(editable =>
            {
                editable.Mode(GridEditMode.PopUp);
                editable.Window(w => w.Title(""));
            })
            .Events(e =>
            {
                e.Edit("onEdit");
            })
            .Navigatable()
            .Pageable()
            .Sortable()
            .Selectable()
            .DataSource(dataSource => dataSource
                .Ajax()
                .ServerOperation(false)
                .PageSize(7)
                .Events(events =>
                {
                    events.Error("error_handler");
                    events.RequestEnd("request_end");
                })
                .Model(model =>
                {
                    model.Id(p => p.Code);
                })
                .Read(read => read.Action("Read", "Purpose"))
                .Create(create => create.Action("Create", "Purpose").Type(HttpVerbs.Post))
                .Update(update => update.Action("Update", "Purpose").Type(HttpVerbs.Put))
                .Destroy(destroy => destroy.Action("Destroy", "Purpose").Type(HttpVerbs.Delete))
            )
        )

 

Please help me. Sorry I am a newbee in MVC

 

Mervin
Top achievements
Rank 1
 answered on 11 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?