We have this weird scenario where occasionally we get this, and a refresh and it may go away, its 99% not there and 1% of the time shows.
Happens in
Windows
DropDownList
Hi
I use a Kendo window and load the content through AJAX from a partial view.
The partial view contains Kendo controls such as DropDownList, ContextMenu, etc.
How can I remove all the controls (destroy all UI, events, etc.) inside the partial view when I close the Kendo window
Here's the definition of the two items that are linked by the CascadeFrom:
items.Add().Field(f => f.Country)
.ColSpan(1)
.Name("cmbCountry")
.Editor(e => e.ComboBox()
.AutoWidth(false)
.DataTextField("name")
.DataValueField("id")
.BindTo(@CountryModel.Countries)
.Placeholder("--- Select or Type Country"));
items.Add().Field(f => f.StateProvince)
.ColSpan(1)
.Name("cmbStatesProvinces")
.Editor(e => e.ComboBox()
.AutoWidth(false)
.AutoBind(false)
.Placeholder("--- Select State/Province ---")
.DataTextField("name")
.DataValueField("id")
.DataSource(dS => dS.Read(read => read.Action("GetStateList", "Address").Data("filterState")).ServerFiltering(true))
.CascadeFrom("cmbCountry")
@*.BindTo(@StatesProvinces.StateProvince)*@
);
Here's the AddressController.GetStateList:
This works for the first Country that is selected... afterwards - if the Country is changed, the GetStateList is not called again to refresh the related/CascadeFrom Combobox.
In my application II have a modal window that contains a date picker. If I move the window down then click the date picker button the window moves back to the top of the screen
Any ideas?
Hi guys,
I have a kendo window which I have controls inside the window.
The idea is to keydown what the user enters to the folderName label which creates and shows the user the name of the folder that will be created in the network drive.
see attached screen shot
so far i have this code below. But the logic is not yet correct
function formatStringfoldername(UploadedDT) {
debugger;
var MineName = $("#SFolder").val();
var scan_PersonsScan = $("#scan_PersonsScan").data("kendoMultiSelect").dataItems();
var SiteCode = $("#SiteCode").data("kendoMultiColumnComboBox").dataItem();
var descriptionMineName = SiteCode.MineName;
var scan_EquipmentDetails = $("#scan_EquipmentDetails").data("kendoMultiSelect").dataItems();
var scan_Projects = $("#scan_Projects").data("kendoMultiSelect").dataItems();
if (descriptionMineName ==="") {
// var result = "N:\\Backup\\" + UploadedDT + " " + descriptionMineName;
}
if (MineName === "") {
// var result = "N:\\Backup\\" + UploadedDT + " " + descriptionMineName + " " + MineName;
}
else if (scan_Projects.length > 0) {
$("#FolderPathstructurechange").text(`N:\\Backup\\ ${UploadedDT} ${MineName} ${scan_PersonsScan[0].Initials} ${scan_Projects[0].Project.Project1}`);
}
else if (scan_EquipmentDetails.length > 0)
{
$("#FolderPathstructurechange").text(`N:\\Backup\\ ${UploadedDT} ${MineName} ${scan_PersonsScan[0].Initials} ${scan_Projects[0].Project.Project1}`);
}
//var result = "N:\\Backup\\" + UploadedDT + " " + scan_PersonsScan[0].Initials + MineName;
// $("#FolderPathstructurechange").text($.validator.format("N:\\Backup\\" + " {0} , I'm {1} years old", [UploadedDT, "23"]));
}
function change() {
debugger;
var DateScanned = $("#DateScanned").data("kendoDatePicker");
$("#DateScanned").attr("disabled", "disabled");
var value = DateScanned.value();
var UploadedDT = kendo.toString(value, "yyyy-MM-dd");
formatStringfoldername(UploadedDT);
}
@(Html.Kendo().DatePicker().Name("DateScanned") .Events(e => { e.Change("change"); }).Format("dd/MM/yyyy").ToClientTemplate())
<div class="row">
@Html.Label("Short Folder Description:")
<div class="row mt-3">
</div>
@Html.Kendo().TextBox().Name("SFolder").HtmlAttributes(new { onInput = "formatStringfoldername();" }).ToClientTemplate()
</div>
any help will be appreciated.
kind regards
Tony
The Boostrap grid system gives wrong result in a Window.
The grid seems to have only 9 columns.
My View :
@(Html.Kendo().Window()
.Name("window")
.Title("My window")
.Width(400)
.Content(@<
text
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-3"
>
First col
</
div
>
<
div
class
=
"col-md-3"
>
Second col
</
div
>
<
div
class
=
"col-md-3"
>
Third col
</
div
>
<
div
class
=
"col-md-3"
>
Fourth col
</
div
>
</
div
>
</
text
>)
)
The result is shown in the png file.
Any suggestions will be very appreciated.
Hi,
i have view with few butons. when i click button am displaying a view in pop up using kendo window.
here i have a form with 2 fields. after entering form data and submit ,in controller action i want to check whether those 2 fileds values are exists.
if exists i want to show error message with values are already exists, i not exists in database then i want to insert those values.
below is my code
@(Html.Kendo().Window()
.Name("AddProjectWindow")
.Modal(true)
.Width(750)
.Height(500)
.Draggable()
.Resizable()
.Title("Add New Project")
.Actions(actions => actions.Close())
.LoadContentFrom("AddProject", "Home")
.Visible(false)
)
this is my partial popup view
@model Enhancements.Models.Project
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
</head>
<body>
<div>
@{
using (Html.BeginForm("SubmitAddNewProject", "Home", FormMethod.Post, new { id = "basicUsage" }))
{
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<table>
<tr>
<td>Enter Project Code <label style="color:red">*</label></td>
<td> @Html.TextBoxFor(x => x.ProjCode)</td>
<td>
@Html.ValidationMessageFor(m => m.ProjCode, "", new { @class = "text-danger" })
</td>
</tr>
<tr>
<td>Enter Project Name <label style="color:red">*</label></td>
<td> @Html.TextBoxFor(x => x.ProjectName)</td>
<td>
@Html.ValidationMessageFor(m => m.ProjectName, "", new { @class = "text-danger" })
</td>
</tr>
</table>
<div id="message">
</div>
<button type="submit" value="Submit" id="btnValidateForm">Submit</button>
}
}
</div>
</body>
@Scripts.Render("~/bundles/jqueryval")
</html>