Telerik Forums
UI for ASP.NET MVC Forum
1 answer
77 views
I am using a kendo popup window as a form to edit items on a grid. If there are errors with defining the properties if should return to the window with error messages. This is Controller action. Currently if the modelstate is not valid it returns a view without and styling (just Html)> If I return View instead of Partial the page loads correctly but as a full page and not a window
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);

Alexander
Telerik team
 answered on 07 Jun 2024
1 answer
59 views

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

Anton Mironov
Telerik team
 answered on 17 Apr 2024
1 answer
185 views

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

Anton Mironov
Telerik team
 answered on 07 Jun 2023
5 answers
281 views
Hello,
i've got some problems with kendo window: i've got a window opened by grid context menu. if i open the window, close and reopen the content of the window is shown smaller than the first time.

i'm using  the 1.9.1 version of jquery and the 2013.2.716 version of kendo min.

why this happens?

thanks a lot
Paolo


Gav
Top achievements
Rank 1
Iron
 answered on 12 Apr 2023
1 answer
157 views
Hello - we are currently using Telerik.UI.For.AspNet.Core 2020.3.915  is the CheckBoxGroup component available in this version or would we need to upgrade to a newer version of Kendo?  It doesn't not come up as an option for me.
Alexander
Telerik team
 answered on 09 Nov 2022
1 answer
151 views

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:

        public JsonResult GetStateList(string? Country)
        {
            JsonResult? retval = null;
            if (!string.IsNullOrEmpty(Country))
            {   var Country_ID = CountryModel.Countries.Where(s => s.name == Country).ToList()[0].code;
                var State = StatesProvinces.StateProvince.Where(s => s.countryCode == Country_ID);
                retval = Json(State.Select(s => new { id = s.id, name = s.name }).ToList());
            }
            else
                retval = Json(StatesProvinces.StateProvince);
            
            return retval;
        }

 

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.

Yanislav
Telerik team
 answered on 26 May 2022
1 answer
486 views

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?

Yanislav
Telerik team
 answered on 05 Apr 2022
0 answers
192 views
I have a grid inside my grid editor template (subgrid). And both grids have popup editing. Right now the subgrids popup window shows as a part of the main grid editor template (right below the subgrid) and it doesn't show the title. How can I show it as a new window?
Valeria
Top achievements
Rank 1
 asked on 17 Jan 2022
1 answer
174 views

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

5 answers
1.0K+ views

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.

Neli
Telerik team
 answered on 31 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?