I'm trying to replace my javascript alert calls with calls to a custom kendo dialog. The difference is that when a javascript alert is called, all javascript execution is suspended until the user clicks ok. With kendo dialogs, execution continues even if the dialog is set to modal. Is there a way to "wait" for the user to click ok before resuming execution of the rest of the javascript? Having the call to the kendo dialog as the last line in the function isn't always an option. Here is the dialog code:
@(Html.Kendo().Dialog()
.Name(
"alertDialog"
)
.Title(
"FastWeigh 10"
)
.HtmlAttributes(
new
{ @class =
"kAlert"
})
.Width(400)
.Modal(
true
)
.Closable(
true
)
.Visible(
false
)
.Actions(actions =>
{
actions.Add().Text(
"OK"
).Primary(
true
);
})
)
And the dialog call itself:
function
kAlert(message) {
var
kDialog = $(
"#alertDialog"
).data(
"kendoDialog"
);
kDialog.content(
"<div class='fwAlert'><span class='fa fa-info-circle'/><p class='alertText'>"
+ message +
"</p></div>"
);
return
kDialog.open().result;
}
Hello,
I'm having troubles after update with the pagination controls in the grids.
there is a same thread in below link;
https://www.telerik.com/forums/duplicated-grid-pager-controls
my css in page;
"~/Content/kendo/2018.3.1017/kendo.common.min.css"
"~/Content/kendo/2018.3.1017/kendo.default.min.css"
grid pagination blok;
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
Here is an image of the grid pagination with the duplicated controls.
Thank you!
Using Telerik UI for MVC5
The template packaged withe the library generates a project that uses bootstrap 3, and the default solution looks like MVC3/4 (btw, that's annoying as hell). Is it even a MVC5 project?
I know there's a menu option in the VS extension that allows you to convert an existing project to be a Telerik project, but what happens regarding bootstrap if the project is currently using bootstrap 4? The conversion process adds bootstrap style files for kendo. Are they for v3, or does it use v4 versions of those files when bootstrap 4 is being used by the project?
For $1100 I expected better. MUCH better. I shouldn't have to ask these kinds of questions.
Is there a template available for MVC5 and bootstrap 4?
I am getting an invalid template error when I am creating a ListView in which the Editor Template contains a select list that is bound to a datasource that contains elements with an apostrophe. It looks like the text is getting escaped, as the error message shows it being created as "<option value="Conveners' Corner (New)">Conveners' Corner (New)</option>", but I don't know if it's Kendo doing the escaping or MVC or something else. This encode contains a # sign though, and that doesn't get escaped, which causes the error.
Is this a bug with the ListView control? Is there some other event where I can escape the escaped text to put a \\ before an # characters?
I have a page with a pair of dialog controls on it. They "pop-up" into the center of the screen and work as they should, aside from the fact they are also constantly visible at the bottom of the page, overlapping each other.
Here's the definitions:
@(Html.Kendo().Dialog()
.Name("confirmVoid")
.Title("Void Ticket")
.Content("Are you sure you want to void this ticket?")
.Width(300)
.Modal(true)
.Visible(false)
.Actions(action =>
{
action.Add().Text("Yes").Action("onYesVoid");
action.Add().Text("No");
})
)
@(Html.Kendo().Dialog()
.Name("voidSuccess")
.Title("Void Ticket")
.Content("The ticket was voided successfully")
.Width(300)
.Modal(true)
.Visible(false)
.Actions(action =>
{
action.Add().Text("OK");
})
)
I have an MVC grid that has an Ajax datasource with InCell editing. After the grid loads we want to be able to update the contents of cells with JavaScript. So the user will enter a value in a textbox. Click a button that will execute JavaScript. The JavaScript will then update the cells in the grid with the value from the textbox. The idea being that this will save the user from typing the same value into every cell.
Below is the JavaScript function I have. It's looping through the grid and changing the value in cell named "NonOutageCost". If I don't refresh the grid - then I don't see that the value has changed until I click in the cell. After I click in the cell - then it shows me the value the JavaScript function set. But it doesn't show the red dirty flag indicator. If I refresh the grid - then it shows me the value the JavaScript function set. But it doesn't show me the red dirty flag indicator.
Is there a way to have a JavaScript function that is executed by a button click change the cell contents and set the dirty flag indicator? If so, could you show me an example. I've spent a lot of time researching this and looking at the documentation. But I haven't found an example like this. Most of the examples I saw show doing something like this in a databound event. But that won't work in this case. Thanks for your help.
function myFunction() {
alert("Function executes when button is clicked");
var vgrid = $("#grid").data("kendoGrid");
//Getting grid items
var items = vgrid.dataSource.data();
alert("length = " + items.length);
alert("Non Outage Cost = " + ($('#NonOutageCostInput').val()));
for (i = 0; i < items.length; i++) {
var item = items[i];
if ($('#NonOutageCostInput').val() > 0) {
item.NonOutageCost = $('#NonOutageCostInput').val();
}
}
//Refresh will change the row values - but the dirty flag isn't set - so the Save Changes doesn't update the database
//alert("before refresh");
//$("#grid").data("kendoGrid").refresh();
}
Hi,
i've managed to shrink the size of one column in timeline view, but my first row height still stays the same, so now the first cell in not aligned with others. (look at the screenshot)
I have an application where I use TreeList and Grid. On both of them we have used Selectable and we have a custom command. On the TreeList if you press the custom command the full row is selected. Now we want to have the same functionality on the Grid but can not find why on the TreeList it works and not on Grid.
After further investigation I have found that the reason is because the treelist generates buttons ("<button>") while the grid generates links("<a>").
I have around 30 pages with grids with variable number of custom commands on them, with the possibility for more pages to be developed. How can I make the row selection functionality automatically on any page with grids like the TreeList.
Hi, this seems like it should be easy to do, but all the suggestions I've tried have failed. I simply want to move items from searchResults to Assigned when the user double clicks on an item in searchResults. The examples I've seen have all been for Kendo for Jquery and I keep getting errors on the "wrapper" piece.
Any help would be appreciated.
@(Html.Kendo().ListBox()
.Name("searchResults")
.BindTo(new List<
TPResourceVM
>())
.DataValueField("Id")
.DataTextField("FullName")
.HtmlAttributes(new { style = "height:600px;width:40%" })
.Toolbar(toolbar =>
{
toolbar.Position(Kendo.Mvc.UI.Fluent.ListBoxToolbarPosition.Right);
toolbar.Tools(tools => tools
.TransferTo()
.TransferFrom()
);
})
.Selectable(ListBoxSelectable.Multiple)
.ConnectWith("assigned")
)
@(Html.Kendo().ListBox()
.Name("assigned")
.HtmlAttributes(new { style = "height:600px;width:40%" })
.DataValueField("Id")
.DataTextField("FullName")
.Selectable(ListBoxSelectable.Multiple)
)