Telerik Forums
Kendo UI for jQuery Forum
1 answer
14 views

My requirement is similar to this question "How to reset the scroll position in a Kendo Dialog (jquery) in Kendo UI for jQuery | Telerik Forums"Reset Scroll Position in Kendo Dialog jQuery

My only requirement is to reset the scroll position of the dropdown whenever a button is clicked. Currently, when I reopen the dropdown, it remembers the last scroll position. I want this position to be reset whenever the user performs an action, such as clicking a button.

Neli
Telerik team
 answered on 26 Mar 2024
0 answers
17 views
Hello Everyone, 
I use Kendo Chat. the user writes a text (promt). this prompt goes to my endpoint and returns a response. i print this response back to the chat, but there is a problem. for example, the incoming text : 
"
This is a sample article. Sample text.
Sample text on the second line.
Sample text in the third line.
Sample text in the fourth line.
"
This is what the output looks like when I print it: 
"
This is a sample article. Sample text, sample text on the second line, sample text on the third line, sample text on the fourth line.
"

I'm tired of searching for a solution. I can't find it.
My code snippet: 



  $.ajax({
            url: SendPrompt.fmt(encodedMessage, encodedUserName), 
            async: true,
            contentType: 'application/json',
            type: "POST",
            dataType: "json",
            processData: false,          
            headers: { Authorization: tokenData() },
            beforeSend: setHeader,
            success: function (data) { 
                    var answer = data.Answer.replace(/(?:\r\n|\r|\n)/g, '\n\n');                   
                chat.renderMessage({
                    type: "MyText",
                    text: answer 
                }, {
                    id: kendo.guid(),
                    name: gptName
                });
            }, error: function (jqXHR, textStatus, errorThrown) {
                console.log("Status:", textStatus);
            },
            complete: function () {
                messageTemplate.animate({ opacity: 0 }, 500, function () {
                    $(this).css({ display: 'none' });
                });
                chat.wrapper.find(".k-input").prop('disabled', false);
                chat.wrapper.find(".k-button-send").prop('disabled', false);
            }
        });

Please help me..
Deniz
Top achievements
Rank 1
 asked on 21 Mar 2024
1 answer
18 views
Does it stop upgrading?
Nikolay
Telerik team
 answered on 19 Mar 2024
1 answer
30 views

I am trying to fix an issue on an old react application with jquery dependencies and I am not familiar with the approach used here. We are using the following dependencies(some important ones mentioned). Node version is 14.x

"dependencies": {
"@progress/kendo-ui": "^2021.3.1207",
"@types/node": "^12.20.15",
"@types/react": "^17.0.11",
"moment": "^2.29.4",
"react": "^17.0.2",
.
.
.
}

  "devDependencies": {
    "@types/jquery": "^3.5.5",
.
.
.
  }


Right now we are using the below timepicker and this passes in a datetime value on save, in this format 2024-03-14T09:00:00.000Z. But I want to change this to pass in value as a time in this format HH:mm:ss . 

      <input
        id={this.id}
        name={this.props.validationName}
        data-role="timepicker"
        data-bind={`value: ${ValueCodes.Start}`}
        data-format="h:mm tt"
        required={true}
        disabled={true}
      />

I understand that the ValueCodes.Start mentioned above is linked with the type of the input filed. I did find the following set of codes that determine the type of that field in the corresponding datasource builder file.

export class ValueCodes {
  public static readonly Start = 'sTRT_TIME';
.
.
.
}

protected getDataSourceOptions() {
    const fields: { [key: string]: { type: string } } = {};
    switch (this.categoryCode) {
      case 'INIT':
        fields[ValueCodes.Start] = { type: 'date' };
.
.
.
        break;
.
.
.
      default:
        break;
    }
    return {
      fields: fields,
      transportOptions: { baseUrl: `${X.getApiUrl()}value/${this.categoryCode}` }
    };
  }
}

On changing the 'type' from 'date' to 'time' here, fields[ValueCodes.Start] = { type: 'date' }; I encountered some errors. I was only able to save the value in my desired format, if I disable validation. Aprart from that the timepicker now will not load the datetime or time value fetched from the backend because of the 'type' change from 'date' to 'time'.

Is there a specific way in kendo that I can try to overcome this?

Neli
Telerik team
 answered on 19 Mar 2024
0 answers
19 views

I am trying to call a function from the javascript from filter. If I try to filter the column , the function is not being called. There is no any error in console and the value is coming into the grid. But just that trigger is not called when filter the column. Also I wondering  if I remove the function from the script , it will look for the function and will give the error function not found. But if there is function, it will not call the function and alert message is not getting 
We are using the latest version of Kendo Telerik grid. Why the filterable.UI does not work in Asp.net core MVC? How can I find the reason why it is not called?

 

Here is my code



columns.Bound(e => e.City)
                .Filterable(filterable => filterable.UI("cityFilter"))
                .Width(200);

<script type="text/javascript">
    

 function cityFilter(element) {
        alert('testting'
    }
</script>


Pol
Top achievements
Rank 1
Iron
 updated question on 14 Mar 2024
1 answer
20 views

Hello Kendo Experts,

I'm currently working on integrating a Kendo JQuery Grid with an ASP.NET Core server-side setup that utilizes Fluent Validation for data validation. When submitting data via the grid, the server responds with a structured error message in case of validation failures, following this format:

{
    "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
    "title": "One or more validation errors occurred.",
    "status": 400,
    "traceId": "|30c76381-41abcc1635c93e3c.",
    "errors": {
        "ProductId": [
            "'ProductId' must not be empty."
        ],
        "Quantity": [
            "'Quantity' must not be empty.",
            "'Quantity' must be greater than '0'."
        ]
    }
}



My goal is to handle these validation errors and present them to the user in a user-friendly manner within the Kendo Grid interface. This involves processing the error messages received from the server and displaying them near the corresponding input fields for easy identification and correction by the user.

Could you kindly provide guidance or suggestions on how to achieve this? Any insights or examples on how to format and display these error messages effectively within the Kendo Grid would be greatly appreciated.

Thank you for your assistance.

Martin
Telerik team
 answered on 14 Mar 2024
0 answers
16 views

I have a model DateTime property called CreatedDate and If I try to filter by date  using the filter 'Is equal to' for a single date, it will not filter the records for the given date due its time part in it filter checking. So How can I make it filter truncating the time part from the filter ?
Pol




public class EmployeeViewModel

{

public string Name{get; set;}

public DateTime  CreatedDate{get; set;}

}

In Kendo Grid
column.Bound(c=>c.CreatedDate).Title("Created Date")

Pol
Top achievements
Rank 1
Iron
 asked on 14 Mar 2024
0 answers
22 views

I am trying to sort alphabetically string values inside the multi filter combobox in Kendo Grid to filter. Now it shows randomly there is no any order in mvc. Here is the code


columns.Bound(c => c.EmpName).Title("Employee Name")
.Filterable(filterable => filterable
.Multi(true)

Pol
Top achievements
Rank 1
Iron
 asked on 13 Mar 2024
1 answer
26 views
 

I am trying to create a multifilter from enum data type column using the ItemTemplate. But ItemTemplate Javascript function is not being called and data is not being shown in combobox. Please can you give me a help. Here is the code

Enum Records

public enum EmpTypes
{
    [Display(Name = "Service")]
    Service = 0,
    [Display(Name = "Sales")]
    Sales = 1,
    [Display(Name = "Purchase")]
    Purchase = 2,
    [Display(Name = "Office")]
    Office = 3
}

Kendo Grid

columns.Bound(c => c.EmpTypes).Title("Type")
        .Filterable(filterable => filterable
            .Multi(true)
            .UI(“”).DataSource(s=>s.Read(r=>r.Action(“GetEmpTypes”,”Report”)))
            .ItemTemplate(“typetemplate”));
<script>
 function typetemplate(e)
{
  alert('Test');
}

</script>
Action Method in MVC controller

Public ActionResult GetEmpTypes()
{
 List<EmpType> emptypes = new List<EmpType>();
emptypes.Add(EmpType.Sales)
emptypes.Add(EmpType.Report)
return Json(emptypes,JsonRequestBehavior.AllowGet);
}


 

Mihaela
Telerik team
 answered on 13 Mar 2024
1 answer
22 views

Does anyone have any idea on how to create a chart with Axis like this with the Kendu UI for JQuery?

Specifically I'm trying to recreate the Y Axis.

 

 

Neli
Telerik team
 answered on 12 Mar 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?