We have defined a new data source which executes a $.ajax to retrieve some data from a remote server.
return new kendo.data.DataSource({
pageSize: 10,
serverPaging: true,
serverSorting: true,
serverFiltering: true,
type: "json",
sort: {
field: "name",
dir: "asc"
},
transport: {
read: function (options) {}....Now lets consider the following scenario:
The read function is triggered and the call is made to the server but the server is being slow. In the meantime a new read request needs to be made and we want to abort the current read request and issue a new one.
Using vanilla Jquery we just do something like
myAjaxRequest.abort()
However, I can not seem to find a similar method to abort a read request (or any request) in the Kendo Data Source Object.
Are you able to offer a solution?
Hello:
I'm newer for Kendo UI for jquery. I want to use drawer widget to get remoting data.
But I found that after getting the remoting data and show on drawer content.
The drawer show/hide function will be not work (Below toggleDrawer() function is work if not performing get data).Can somebody help me?
Below is my code.
<div id="toolbar"></div>
<div id="drawer">
<div id="drawerContainer" style="margin-left: 5px;">
</div>
</div>
<script type="text/x-kendo-template" id="drawerTemplate">
<ul>
<li data-role='drawer-item' class='k-state-selected'>
<span class='k-icon k-i-inbox'></span>
<span class='k-item-text' data-id='Inbox' data-url='test2.html'>
Inbox
</span>
</li>
<li data-role='drawer-separator'></li>
<li data-role='drawer-item'><span class='k-icon k-i-notification k-i-bell'></span><span class='k-item-text' data-id='Notifications'>Notifications</span></li>
<li data-role='drawer-item'><span class='k-icon k-i-calendar'></span><span class='k-item-text' data-id='Calendar'>Calendar</span></li>
<li data-role='drawer-separator'></li>
<li data-role='drawer-item'><span class='k-icon k-i-hyperlink-email'></span><span class='k-item-text' data-id='Attachments'>Attachments</span></li>
<li data-role='drawer-item'><span class='k-icon k-i-star-outline k-i-bookmark-outline'></span><span class='k-item-text' data-id='Favourites'>Favourites</span></li>
</ul>
</script>
<script>
$(document).ready(function () {
var drawerInstance = $("#drawer").kendoDrawer({
mode: "push",
template: $("#drawerTemplate").html(),
autoCollapse: false,
itemClick: onItemClick,
mini: true
}).data("kendoDrawer");
drawerInstance.show();
});
function onItemClick(e) {
var drawerName = e.item.find(".k-item-text").attr("data-id");
//alert(drawerName);
var nextUrl = '/api/test/inbox'
if (drawerName == 'Inbox') {
nextUrl = 'grid1.html'
}
$.ajax({
url: nextUrl,
method: 'GET',
success: function (result) {
$('#drawerContainer').html(result);
}
});
}
function toggleDrawer() {
var drawerInstance = $("#drawer").data().kendoDrawer;
var drawerContainer = drawerInstance.drawerContainer;
if (drawerContainer.hasClass("k-drawer-expanded")) {
drawerInstance.hide();
} else {
drawerInstance.show();
}
}
$("#toolbar").kendoToolBar({
items: [
{ type: "button", icon: "menu", attributes: { "class": "k-flat" }, click: toggleDrawer },
{
template: "<h3 style='margin-left: 25px;'>RA Web</h3>" },
{ type: "spacer" },
{ type: "button", icon: "information", attributes: { "class": "k-flat" } },
{ type: "button", icon: "gear", attributes: { "class": "k-flat" } }
]
});
</script>
Thanks.
I need to use two MultiSelect widgets side by side and only one will render. The second <select> element just gets completely omitted from the DOM. There are no javascript errors and both widgets are getting initialized. The second one just doesn't show up. I was unable to replicate the issue with a simple working example but I have included my HTML, the HTML that gets rendered, and my javascript for initializing the widgets. Thanks in advance for any help.
My HTML:
<div id="scheduleToolContainer" class="wrapper">
<div class="notificationPrompt"></div>
<div id="scheduleToolContent">
<button id="btnPrevDate" type="button" class="btn btn-light border"><i class="fas fa-arrow-left"></i></button>
<input id="scheduleDatePicker" title="datepicker" />
<button id="btnNextDate" type="button" class="btn btn-light border"><i class="fas fa-arrow-right"></i></button>
<select id="ddAttendingProvider" style="width:250px" data-target-url="@Url.Action("GetAttendingProviders", "ScheduleTool", new { area = "PatientLists" })" />
<select id="ddInsurance" style="width:250px" data-target-url="@Url.Action("GetInsuranceList", "ScheduleTool", new { area = "PatientLists" })" />
<button id="btnViewSchedule" class="btn btn-primary">Apply</button>
<div id="scheduleGrid" class="mt-2 rounded" data-schedule-url="@Url.Action("GetScheduleItems", "ScheduleTool", new { area = "PatientLists" })"></div>
</div>
<button id="btnPrintEncounters" class="btn btn-light border mt-2" data-target-url="@Url.Action("PrintSelectedEncounters", "ScheduleTool", new { area = "PatientLists" })"><i class="fas fa-file-medical-alt fa-2x"></i></button>
<div id="gridLoadingSpinner" class="text-center text-secondary"><i class="fas fa-spinner fa-spin fa-3x"></i></div>
</div>HTML in the DOM:
Javascript (get's called when the page loads):
function loadFilters() {
$("#ddAttendingProvider").kendoMultiSelect({
placeholder: 'All',
dataSource: {
transport: {
read: {
url: attProvidersUrl,
type: "POST",
data: function () {
return {
filter: Filters.toRequestFilter(),
date: $('#scheduleDatePicker').val()
}
}
}
}
}
});
$("#ddInsurance").kendoMultiSelect({
placeholder: 'All',
dataSource: {
transport: {
read: {
type: "POST",
url: insuranceListUrl,
data: function () {
return {
filter: Filters.toRequestFilter(),
date: $('#scheduleDatePicker').val()
}
}
}
}
}
});
}
Support,
I am pulling my hair out here.
I have created a Chart, all the options are correct (i have done a notepad++ compare to a exmple in this Dojo - https://dojo.telerik.com/UdezARot)
Yet for some reason, it shows the wrong values in the output. The total amount (Count) is correct, but the years are wrong and I cannot even figure out how its getting the values
For 2021 it shows 17, the total of 2020 and 2021 for example is 19....
I have attached some screen shots, as well as a DevTools rightclick copy Object from the kendoChart.options
I cannot for the life of me, figure out what I have done wrong.
ANY HELP would be greatly appreciated.
Thanks in advance.
How do you display text in a grid cell that has embedded HTML so that formatting is applied to the text. Here is an example of some text:
<b>GREASE PUMP REGULATOR</b> Hand - Slowly adjust the inlet air pressure regulator to 15psi by turning the knob CW. <font color="red"><u><b>Do not exceed 15psi</b></u></font> The max rate for purging the grease is 1/2 ounce/second
Hi, I need to enable / disable command column basing on the dataOrderFilter value. if filter value is NOTTRANSFER, then the command column in the grid should be enabled. if the filter value is INTRANSIT or TRANSFER, then the command column should be disabled. how to achieve this?
var dataOrderFilter = [{ value: "", text: "All Orders" }, { value: "MYORDER", text: "My Orders" }, { value: "NOTTRANSFER", text: "Orders not Transferred", defaultValue: true }, { value: "INTRANSIT", text: "Orders in Transit" }, { value: "TRANSFER", text: "Orders Transferred"}];
Hi,
I did update project ExampleCSVS2010 to new version of Kendo Windows ver. 2021.3.914
After update I got error for class "ExamplesForm":
The type or namespace name "ExamplesForm" could not
be found (are you missing a using directive or an assembly ....)
Thanks,
Leonid
Hi, I just came into contact with Kendo UI. I think it is very powerful, especially the function of MVVM is very easy to use.
I have a question that I haven't understood. After setting the data of the datasource, you can operate on it, but the schema.model property can set the information of the data field. Is this unnecessary?
I never know the relationship between datasource and schema. Model. It seems that I don't set schema. Model and datasource works normally.
Can any engineer explain their specific links and functions? Thank you for your help.
Hi,
I found RadChart has been discontinued as of Q3 2014, so can I build a chart like RadChart with kendo Chart?
Thanks,
An