Telerik Forums
Kendo UI for jQuery Forum
3 answers
289 views

I have an application that displays errors with the notification that uses templates.

One of the errors that I got was a telerik error that the template was wrong however the displayed message has interpreted the html code.

Looking in the documentation I saw that to encode the html you should use showText instead of show so I used it but the notification displayed the same thing. The html was not encoded.

Please see the reproduction

https://dojo.telerik.com/eNaBikIm

What can I do so that the message is not interpreted?

Nencho
Telerik team
 answered on 25 Oct 2018
3 answers
524 views

Hi, I currently have an app which is using Kendo UI by referencing the CDN hosted minified js file (https://kendo.cdn.telerik.com/2015.2.624/js/kendo.all.min.js).

I would like to incorporate kendo into my build script to only package the modules that I am using (kendoAutoComplete) into a single local js file that I can then reference in my application. I have tried building using webpack but the resultant file does not seem to work as the CDN hosted file did.

How can I compile the required modules inside the npm package into a standalone js file that I can reference as per the CDN hosted file?

Note: I do *not* want to have to modularise/rewrite my application to make it work with webpack...

Bozhidar
Telerik team
 answered on 25 Oct 2018
3 answers
859 views
 Hi, I'm trying to fill a panel with the content of a partial view using the following :

@(Html.Kendo().PanelBar()
        .Name("tPanelBarNavFolder")
        .ExpandMode(PanelBarExpandMode.Single)
        .HtmlAttributes(new { style = "width:300px" })
        .Items(panelbar =>
        {
            panelbar.Add().Text("My Folder")
                .Expanded(true)
                .Content(@<text> <div> abc @{ Html.RenderPartial("pvMyFolder", this.Model); } </div>
                </text>);
            
            panelbar.Add().Text("Communication").Enabled(false);
        })

The content of my partial view is <span>My Folder</span>.
However the partial view is not within the content of My Folder. It shows outside the Panel bar.
The above code working fine in Telerik MVC Extensions(superseded).
td0rmx
Top achievements
Rank 1
 answered on 24 Oct 2018
7 answers
1.9K+ views

With a cascading dropdown, it seems like the default behavior is to highlight a selection as a user starts typing with a 'begins with' type search.

Is there a simple way to switch this to a 'contains' type search if nothing begins with the users input? 

Dimitar
Telerik team
 answered on 24 Oct 2018
6 answers
352 views

Is it possible to lock/disable first two columns in my below code. Instead of cell lock I want to do column level lock.

@(Html.Kendo().Spreadsheet()
.Name("spreadsheet")
.Sheetsbar(false)
.Toolbar(x => x.Data(false).Insert(false))
.HtmlAttributes(new { style = "width:100%;" })
.Rows(5000)
.Events(e => e.ExcelImport("niinStockImport"))
.Sheets(sheets =>
{
sheets.Add()
.Name("NiinStock")
.DataSource<DynMRO.DTO.Logistics.Planning.NiinStockSearchResultDTO>(ds => ds
.Ajax()
.Batch(true)
.Read(r => r.Action("NiinStockBulkSearchResults", "Logistics").Data("getCriteria"))
.Update(u => u.Action("NiinStockBulkUpdate", "Logistics").Data("getCriteria"))
.Events(e => e.Change("onChange"))
.Model(m =>
{
m.Id(p => new { p.NiinStockID, p.ORGID });
})
)
.Columns(columns =>
{
columns.Add().Width(100);
columns.Add().Width(415);
columns.Add().Width(0);
columns.Add().Width(0);
columns.Add().Width(145);
})

;
})
)

Maxwell
Top achievements
Rank 1
 answered on 24 Oct 2018
6 answers
1.1K+ views

Hi,

 

I am trying to use custom pop editor in kendo grid ( https://dojo.telerik.com/EvacaKAW ). What I am trying to do is, I need the grid to be editable and the column "text" must be a read-only column. If I try to click on that cell, it is converting as a normal text box hiding the edit button, instead I want to make the input field readonly and I want to enter the text only by using Edit button. I tried to make the column as "editable:false", but it is not allowing me to set the data to the column when I close the editing window.

How can I achieve this by making column (or div inside column) as read-only?

Appreciate the suggestion on this. Thanks in advance.

Sag
Top achievements
Rank 1
 answered on 24 Oct 2018
3 answers
3.1K+ views
I have a column that is returning to my UI in HTML format like <a href="http://google.com">google</a>. I am using a row template to populate my grid but when my column outputs, it outputs the HTML like plain text. How do I get it to render like HTML?

<script id="rowTemplate" type="text/x-kendo-tmpl">
    <tr>
        <td>
            ${Phone}
        </td>
        <td>
            ${DetailUrl}
        </td>
    </tr>
 </script>

$("#grid").kendoGrid({
    columns: [
                { field: "Phone", title: "Phone" },
                { field: "DetailUrl", title: "Detail" }
            ],
    rowTemplate: kendo.template($("#rowTemplate").html())
});

Tsvetomir
Telerik team
 answered on 24 Oct 2018
4 answers
875 views

Hi..

I'm using kendo gantt chart in my project using anular js,how can i disable drag and drop option

here is the my code 

view : 
            <div id="activityganttchart" kendo-gantt k-options="createScheduleStep2.ganttOptions" class="row"
                 k-rebind="createScheduleStep2.ganttOptions"></div>

controller:

                productionScheduleStep2Vm.ganttOptions = getActivitiesToDisplayOnGanttChart(activities);
                productionScheduleStep2Vm.ganttOptions.edit = edit;
                productionScheduleStep2Vm.ganttOptions.moveStart = ganttMove;

           function processActivitiesToDisplayGanttChart(data: any) {
                var activityList = new Array();
                for (var i = 0; i < data.length; i++) {
                    var uomName = "";
                    if (data[i].pitOutputActivity.activityValueUOMId && data[i].pitOutputActivity.activityValueUOM !== undefined) {
                        uomName = data[i].pitOutputActivity.activityValueUOM.name;
                    }
                    var activity = {
                        ID: data[i].pitOutputActivity.id,
                        Title: data[i].pitOutputActivity.activity.name,
                        Start: '\/Date(' + (+new Date(data[i].pitOutputActivity.startDate + " " + data[i].pitOutputActivity.startTime)) + ')\/',
                        End: '\/Date(' + (+new Date(data[i].pitOutputActivity.endDate + " " + data[i].pitOutputActivity.endTime)) + ')\/',
                        target: data[i].pitOutputActivity.activityValue + " " + uomName,
                        activityId: data[i].pitOutputActivity.activityId,
                        shift: data[i].pitOutputActivity.pitOutputActivityPartA.shift,
                        pitOutputActivityUUID: data[i].pitOutputActivity.pitOutputActivityUUID,
                        percentComplete: data[i].progress === "NaN" ? 0 : data[i].progress,
                        planned: data[i].planned,
                        actual: data[i].actual,
                        variance: data[i].variance,
                        assetCount: data[i].assetCount
                    }
                    activityList.push(activity);
                }
                return activityList;
            };


            function edit(e) {
                productionScheduleStep2Vm.selectedActivity = e.task;
                win = $("<div class='ganntPopup' />").kendoWindow({
                    title: "Manage Activity",
                    resizable: false,
                    modal: true,
                    pinned: true,
                    position: { top: 100 }
                });
                e.preventDefault();
                var template = createScheduleStep2Helpers.compileAngularContent($("#activityMenu").html(), $scope, $compile);
                win.data("kendoWindow").content(template).center().open();
            };

            function ganttMove(e) {
                console.log(kendo.format("task's curren Start {0:g}", e.start));
                console.log(kendo.format("task's curren End {0:g}", e.end));
                e.preventDefault();
            };

 

i tried with moveStart  event still im able to dran and drop

Appreciate your support!
Thanks!

 

Manoj
Top achievements
Rank 1
 answered on 24 Oct 2018
2 answers
3.4K+ views
What is the best and most efficient way to expand and collapse all nodes for a given TreeList?  I'm currently using the following code where fp-grid is the root div element of my kendoTreeList.  It works.  But it's very slow!  Is there a better and more efficient way to do this?
var treeList = jQuery('#fp-grid').data("kendoTreeList");
if (treeList) {
  jQuery('#fp-grid tbody>tr').each(function (index) {
    if (treeExpand) {
      treeList.expand(jQuery(this));
    } else {
      treeList.collapse(jQuery(this));
    }
  });
}
Kevin
Top achievements
Rank 1
 answered on 23 Oct 2018
1 answer
352 views
We’ve tried to use the Grid’s ODataV4 Web Api Binding of “KendoUI for JQuery” and we’ve encountered some problems.
We’ve tried to replicate the business logic of the example in your GitHub repository (here the URL: https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/odata-v4-web-api-binding ).
Debugging your solution we’ve discovered that the filter of field “Category” is broken.
We have found a partial fix to this issue, changing the line 84 of main.html from

{ field: "Category", template: "#: Category ? Category.CategoryName : '' #", editor: categoryEditor },

to

{ field: "Category.CategoryName", editor: categoryEditor },

Unfortunately, this has been useful for the filter, but broke create and update.
We’ve not been able to find a solution and we need that functionality.
Could you send us a suggestion or update your example?

Angel Petrov
Telerik team
 answered on 23 Oct 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?