Telerik Forums
UI for ASP.NET MVC Forum
1 answer
71 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
185 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
66 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
85 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
357 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
126 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
109 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
814 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
1 answer
998 views

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>

 

Aleksandar
Telerik team
 answered on 01 Mar 2021
1 answer
180 views

Hi ,

I am using a Html form inside the Kendo window .But the model values are not binding to the textbox and dropdown controls when I am submitting the form.

Here is my code.

Html.Kendo().Window()
.Name("addressPopup")
.Visible(false).Title(false)
.Scrollable(false)
.Draggable(false)
.Modal(true)
.Content(@<text>
<div id="AddressVerificationModal" style="padding:2% !important">
<h1 class="header-lbl-md-2" style="line-height:1px">Verify information</h1>
<div class="divider-headpopup " style="width:445px">
<span class="divider-headpopup" />
</div>
<br />
<br />
<div class="searchformfld padright" style="width:49%!important">
@Html.TextBoxFor(m => m.FirstName, new { placeholder = " ", autocomplete = "off", onBlur = "ValidateField(event)" })

</div>

<div class="searchformfld " style="width:30%;padding-top:11px">
            @Html.DropDownListFor(m => m.StateCode, new SelectList(States, "StateCode", "StateCode"), new { placeholder = " ", autocomplete = "off" })
            <label for="StateCode" id="lblStateCode">State*</label>
 </div>

 </div></text>).Render();

If I remove the Kendow Window code it is binding the values as expected.

Ivan Danchev
Telerik team
 answered on 16 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?