Telerik Forums
Kendo UI for jQuery Forum
1 answer
48 views

Hi,

Does the chat control support rendering messages that are in Markdown format? For Example:

**James Smith**

- Department: Development

- Role: Senior Developer

This should show James Smith in bold. If the chat control does not support this can you suggest any approaches to achive this?

Thanks,

Euan

Martin
Telerik team
 answered on 06 Feb 2025
0 answers
50 views

Hi,

I'm trying to use grid with custom popup editor.

All works fine, but with my code, if I remove a line of the grid (custom remove with prompt), and then I try to insert a new one, the editor does not close and triggers both the "create" event and the "destroy" event (this with same parameters as the last called one), but I want only the "create" and to close the popup.

How can I prevent this unwanted behaviour?

here's the code:

 


<div id="corsi"></div><div id="window"></div><script id="popupTemplate" type="text/x-kendo-template"> <div class="k-edit-label"> <label for="Inizio">Inizio:</label> </div> <div class="k-edit-field"> <input id="Inizio" name="datainizio" data-bind="value:datainizio" required /> <span class="k-invalid-msg" data-for="Inizio"></span> </div> <div class="k-edit-label"> <label for="products">Fine:</label> </div> <div class="k-edit-field"> <input id="Fine" name="datafine" data-bind="value:datafine" required /> <span class="k-invalid-msg" data-for="Fine"></span> </div> <div class="k-edit-label"> <label for="Turno">Turno:</label> </div> <div class="k-edit-field"> <input id="Turno" name="turno" data-bind="value:turno" required /> <span class="k-invalid-msg" data-for="Turno"></span> </div> </script><script type="text/x-kendo-template" id="windowTemplate"> <p>Eliminare il corso <strong>#= datainizio # - #= datafine # (#= turno #)</strong>?</p> <p style="color: red; font-weight: bold;">Eliminerai anche tutte le prenotazioni!</p> <button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base" id="yesCancelButton"><span class="k-button-text">Si</span></button> <button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base" id="noCancelButton"><span class="k-button-text">No</span></button> </script><script type="x/kendo-template" id="page-template"> <div class="page-template"> <div class="header"> <div style="float: right">Report Corsi Scuola Vela <?=(isset($_GET["anno"]) ? $_GET["anno"] : date("Y"));?></div> </div> <div class="footer"> Pagina #: pageNum # di #: totalPages # </div> </div> </script><script> $(document).ready(function () { var windowTemplate = kendo.template($("#windowTemplate").html()); const dataSource = new kendo.data.DataSource({ transport: { read: { url: "/gest/ajax/corsiScuolaVela-view.php<?=(isset($_GET["anno"]) ? "?anno=" . $_GET["anno"] : NULL);?>", dataType: "json" }, update: { url: "/gest/ajax/corsiScuolaVela-update.php<?=(isset($_GET["anno"]) ? "?anno=" . $_GET["anno"] : NULL);?>", method: "post", dataType: "json" }, destroy: { url: "/gest/ajax/corsiScuolaVela-destroy.php", method: "post", dataType: "json" }, create: { url: "/gest/ajax/corsiScuolaVela-create.php<?=(isset($_GET["anno"]) ? "?anno=" . $_GET["anno"] : NULL);?>", method: "post", dataType: "json" }, }, batch: false, schema: { model: { id: "id", fields: { id: { type: "number", editable: false }, datainizio: { type: "date", validation: { required: true } }, datafine: { type: "date" , validation: { required: true }}, turno: { type: "string" }, prenotazioni: { type: "string", editable: false }, } } } }); function initDropDownLists() { var inizio = $("#Inizio").kendoDatePicker({format: "dd/MM/yyyy", dateInput: true}).data("kendoDatePicker"); var fine = $("#Fine").kendoDatePicker({format: "dd/MM/yyyy", dateInput: true}).data("kendoDatePicker"); var turni = $("#Turno").kendoDropDownList({ autoBind: false, optionLabel: "Seleziona Turno...", dataTextField: "text", dataValueField: "value", dataSource: [ { text: "Mattina", value: "Mattina" }, { text: "Pomeriggio", value: "Pomeriggio" } ] }).data("kendoDropDownList"); } let grid = $("#corsi").kendoGrid({ sortable: { mode: "multiple" }, resizable: true, dataBound: function() { for (var i = 0; i < this.columns.length; i++) { this.autoFitColumn(i); } }, toolbar: [ { name: "create", text: "Nuovo" }, { name: "excel", text: "Esporta Excel" }, { name: "pdf", text: "Esporta PDF" }, ], excel: { fileName: "Report Corsi Scuola Vela <?=(isset($_GET["anno"]) ? $_GET["anno"] : date("Y"));?>.xlsx" }, pdf: { allPages: true, avoidLinks: false, paperSize: "A4", margin: { top: "2cm", left: "0.6cm", right: "0.6cm", bottom: "1cm" }, landscape: true, repeatHeaders: true, template: $("#page-template").html(), scale: 1 }, pdfExport: function(e) { e.sender.wrapperClone.addClass('k-clone'); }, columnMenu: { messages: { sortAscending: "Ordina Crescente", sortDescending: "Ordina Decrescente", filter: "Filtra", columns: "Colonne" } }, width: "98%", height: "860px", editable: { mode: "popup", window: { width: 600 }, template: $("#popupTemplate").html() }, edit: function (e) { initDropDownLists(); }, columns: [ { field: "id", title: "Prog.", exportable: { pdf: true, excel: true }}, { field: "datainizio", title: "DATA INIZIO", format: "{0:dd/MM/yyyy}", exportable: { pdf: true, excel: true } }, { field: "datafine", title: "DATA FINE", format: "{0:dd/MM/yyyy}", exportable: { pdf: true, excel: true } }, { field: "turno", title: "TURNO", exportable: { pdf: true, excel: true }}, { field: "prenotazioni", title: "PRENOTAZIONI", exportable: { pdf: true, excel: true }}, { command: [ { className: "btnEdit", name: "edit", text: { edit: "Modifica", update: "Salva / Aggiorna", cancel: "Annulla" } }, { name: "delete", text: "Elimina", click: function(e){ var window = $("#window").kendoWindow({ title: "Sei sicuro di voler eliminare questo Corso?", visible: false, width: "400px", height: "200px", }).data("kendoWindow"); e.preventDefault(); //prevent page scroll reset var tr = $(e.target).closest("tr"); //get the row for deletion var data = this.dataItem(tr); //get the row data so it can be referred later window.content(windowTemplate(data)); //send the row data object to the template and render it window.center().open(); $("#yesCancelButton").click(function(){ grid.dataSource.remove(data) //prepare a "destroy" request grid.dataSource.sync() //actually send the request (might be ommited if the autoSync option is enabled in the dataSource) window.close(); }); $("#noCancelButton").click(function(){ window.close(); }); } } ], exportable: { pdf: false, excel: false } } ], filterable: { messages: { filter: "Filtra", // Sets the text for the "Filter" button. clear: "Annulla Filtro", // Sets the text for the "Clear" button. // When filtering Boolean numbers. isTrue: "è vero", // Sets the text for "isTrue" radio button. isFalse: "è falso", // Sets the text for "isFalse" radio button. // Changes the text of the "And" and "Or" of the Filter menu. and: "E", or: "O" }, operators: { // The filter menu for "string" type columns. string: { eq: "è uguale a", neq: "è diverso da", startswith: "comincia per", contains: "contiene", endswith: "finisce con" }, // The filter menu for "number" type columns. number: { eq: "è uguale a", neq: "è diverso da", gte: "è maggiore o uguale a", gt: "è maggiore di", lte: "è minore o uguale a", lt: "è minore di" }, // The filter menu for "date" type columns. date: { eq: "è uguale a", neq: "è diverso da", gte: "è successiva o uguale a", gt: "è successiva a", lte: "è precedente o uguale a", lt: "è precedente a" }, // The filter menu for foreign key values. enums: { eq: "è uguale a", neq: "è diverso da" } } }, filterable: true, dataSource: dataSource }).data("kendoGrid"); });


Alessandro
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 05 Feb 2025
1 answer
40 views

We tried to apply the arabic conversion logic to the page. We have control like textbox, dropdown, date and grids with labels. The labels of all controls was changed without any issue. The grid column header caption and the data was also changed.

But the value inside the textbox, dropdown was not changed. Any guidance to resolve this issue.

I used the below code to enable the Google Translation in page.

function googleTranslateElementInit() {
                 new google.translate.TranslateElement({
                    pageLanguage: 'en',
                    includedLanguages: 'ar,en',
                    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
                 }, 'google_translate_element');
            }

 

I herewith shared a video for your reference.

Martin
Telerik team
 answered on 05 Feb 2025
1 answer
69 views
Hi. I have a listview with an html template. I need to call an async function to get an image url from our service based on the value of one of the returned fields. How can I use await in the template? Or is it even possible? This is a simplified part of my template. I tried a few different ways to get it to work, but just get an invalid template error. Any help is appreciated.

<script type="text/x-kendo-template" id="lvProducersTemplate">
     <div>
          <div>
             #if(RFLogoId) {
                var logoUrl = await utils.getRFLink(RFLogoId);
             }#
             <img alt="profile img" src="#:logoUrl#">                            

          </div>
</div>
</script>

Martin
Telerik team
 answered on 04 Feb 2025
1 answer
49 views

Hi
I would like to use SaveAsPdf export in my application. I need to place the export button somewhere other than on the tollbar.
Is there a way to make such export in the background without auto clicking through each page in the gui, like in the case of using toolbar: ["pdf"]?

It must have the ability to export all pages and auto paper size.

Example:

https://dojo.telerik.com/PUvxeVje

Martin
Telerik team
 answered on 31 Jan 2025
2 answers
184 views
When I use the auto complete with the auto separator and use spaces after the separator, it does not work. As shown below in the image, I type 'France,denm', the suggest will not appear. If I type, 'France, denm' it will suggest Denmark.


Darron
Top achievements
Rank 1
Iron
 answered on 29 Jan 2025
1 answer
33 views

Hello,

 

Given the provided ListView MVVM example (https://demos.telerik.com/kendo-ui/listview/mvvm),

I was wondering if there is a way to load the ListView in edit mode for the first entry upon loading the page.

Would anybody be able to provide a JQuery code snippet of how this can be achieved? Alternatively, could I get an example of an MVVM ListView that has calls the "add" feature upon opening the ListView in a KendoWindow?

 

Thank you,

C

Georgi Denchev
Telerik team
 answered on 28 Jan 2025
1 answer
96 views

The following line results in an error message stating that kendo.mobile.Application() is not a constructor.

I'm also getting the error when I attempt to run any of the kendo mobile examples in Dojo.

For example, the "Open in Dojo" example from here will not run. show - API Reference - Kendo UI Loader - Kendo UI for jQuery and has the same error.

This is my "import" area:

@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
<link href="@Url.Content("~/Content/kendo/2024.4.1112/default-main.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/kendo/2024.4.1112/classic-moonlight.css")" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="@Url.Content("~/Scripts/kendo/2024.4.1112/kendo.all.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo/2024.4.1112/kendo.aspnetmvc.min.js")"></script>
<script src="@Url.Content("~/Scripts/kendo.modernizr.custom.js")"></script>
<script src="@Url.Content("~/Scripts/FilteredDropDownFunctions.js")"></script>
<script src="@Url.Content("~/Scripts/AutoSaveOnNavigateFunctions.js")"></script>

This is the code causing the error:

<script>
    var app = new kendo.mobile.Application();
    if(kendo.support.browser.safari) { kendo.support.pointers = false; } 

    ....

</script>

Nikolay
Telerik team
 answered on 28 Jan 2025
1 answer
45 views

My users are saying that on iPad and iPhone where to see a tooltip you are required to click rather than hover it is too difficult to click on the marker.

Markers are by requirement not visible but the users still need to click the correct position on the line to show the Tooltip.  It seems that the area to click is very precise and very small. It doesn't seem an issue on Desktop where Hover is available to show tooltip on Category series.

I'm looking for a way to make the clickable are bigger/easier for mobile devices.  I found a similar forum question for a bar chart.  I have put it into the the below Dojo but am struggling to make it apply to markers on a line chart.

https://dojo.telerik.com/nCgEHXin

Martin
Telerik team
 answered on 24 Jan 2025
2 answers
56 views

The modal isn't very large, so the calendar popup shows outside the modal.

When selecting a day or month, the date picker is updated and the modal remains open.
When selecting a year, the modal closes. 

As though the mouse click gets passed to the page.

Kendo: 2024.1.319

Peter
Top achievements
Rank 1
Iron
 answered on 24 Jan 2025
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?