public ActionResult EditActivity(EditActivity model) { var activity = _uow.Activities.GetById(model.ActivityId); activity.Phone = model.Phone; activity.Fax = model.Fax; activity.LastUpdateDate = DateTime.Now; activity.LastUpdatedBy = _sessionHandler.UserId; if (ModelState.IsValid) { try { _uow.Activities.Update(activity); _uow.Commit(); TempData["SaveResultMessage"] = $"Changes to Activity : {activity.ActivityName} have been saved"; } catch { ModelState.AddModelError("Save", "Error occurred on save."); } return RedirectToAction("Index", "DepartmentActivity", new { id = activity.DepartmentId, }); } return View(model);
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.