Telerik Forums
UI for ASP.NET Core Forum
6 answers
459 views

I am attempting to create a grid that has the Edit (Update) command available.

When I run the application with the edit options commented out it renders, but when I leave them in I get no errors on the front end and the page is blank. The read controller is not even being hit.

Here is the view code. Any ideas? It seems adding the Edit options somehow breaks the grid.

 

@using Kendo.Mvc.UI
 
@(Html.Kendo().Grid<HoldingOvenEditor.Models.HOGridModel>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(p => p.OvenName);
 
                columns.Command(command => { command.Edit(); }).Width(160); //<= Comment this out to work correctly
            })
            .Editable(editable => editable.Mode(GridEditMode.PopUp)) //<= Comment this out to work correctly
            .DataSource(dataSource => dataSource
                .Ajax()
                .Model(model => {
                    model.Id(p => p.OvenName);
                    model.Field(x => x.OvenName).Editable(true);
 
                })
                .Read(read => read.Action("ResourceGrid_Read", "Grid"))
                .Update(update => update.Action("EditingPopup_Update", "Grid")) //<= Comment this out to work correctly
 
    )
)
Anton Mironov
Telerik team
 answered on 11 Feb 2021
1 answer
119 views
I need to display a hierarchy with checkboxes. For this I want to use TreeView. After the hierarchy finishes loading I have to do some actions. So the TreeView is configured with LoadOnDemand: false and a function is attached to the "dataBound" event. However it seems that the data bound is called after every call to the server. Is there an event that is triggered after all the nodes have been loaded? How can I know that the databound is the last one (all the nodes have been loaded)?
Petar
Telerik team
 answered on 11 Feb 2021
3 answers
423 views

Hello,

is there any way to display a Validation-Message Bubble like in a grid Editor in a TextBox?
I.e. I have this code:

Model:

public class Promotion
{
    [StringLength(10]
    [RegularExpression("^\\$?[A-Z0-9]+$")]
    [Required()]
    public String Code { get; set; }
 
    ....
}

View:

@using (Html.BeginForm())
{
<div>
    @(Html.LabelFor(model => model.Promotion.Code))
    @(Html.Kendo().TextBoxFor(model => model.Promotion.Code))
</div>
}

If, for example, I leave it empty or enter lowercase letters into this TextBox, I would like it to show a Validation-Error-Bubble just like in a Grid Editor.

Thank you

 

daniel
Top achievements
Rank 1
 answered on 11 Feb 2021
3 answers
101 views

Hello Experts,

Is there a way to update the data rows and columns of a sheet after a read on the dataSource's model without it destroying the layout of the entire page?

 

Many thanks in advance

64d1

 

Stoyan
Telerik team
 answered on 10 Feb 2021
1 answer
495 views

When using a date filter on a column bound to a DateTimeOffset property, the filter is missing all its options.

The property:

public DateTimeOffset Created { get; set; }

 

The column definition:

c.Bound(x => x.Created)
.Filterable(f => f
.Operators(o => o.ForDate(d => d.Clear().IsGreaterThanOrEqualTo("On or after").IsLessThan("Before")))
.Extra(true)
.UI(GridFilterUIRole.DateTimePicker)
);

 

When the property type is changed to DateTime, the filter works as expected.

See the attached images. (The operator dropdown just shows "NO DATA FOUND").

No errors are reported in the console.

Using:

<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2021.1.119" />

    "@progress/kendo-theme-bootstrap": "^4.30.0",
    "@progress/kendo-theme-default": "^4.32.0",
    "@progress/kendo-ui": "^2021.1.119",

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 09 Feb 2021
1 answer
302 views
I am using the Tag Helpers and have a grid working with the edit popup dialog. My question is how do I customize the popup? Change the title? Change the button colors or text? Change the height and width?
Neli
Telerik team
 answered on 09 Feb 2021
1 answer
282 views

Hello,

is it possible to Add the Upload Component in the Wizard. I tried it by myself but if i upload a file i get two files. My Issue is the Same like this:

https://stackoverflow.com/questions/54467957/kendo-upload-duplicating-file-after-initial-file-selection

Can Somebody post a code snippet?

 

Here is my test:

 

<div id="wizard">
    <div>
        <h1>Upload Labeling File</h1>
        @(Html.Kendo().Upload()
            .Name("files")
            .Async(a=> a.SaveUrl("./Masterdata/LabelExport?handler=Save")
            .RemoveUrl("./Masterdata/LabelExport?handler=Save")
            )
            .Validation(validation => validation.AllowedExtensions(new string[] { ".json" }))
            .Validation(validation => validation.MaxFileSize(2000000))
            )
 
            <h3>Click "Next" </h3>
    </div>
        <div>
            <h1>Personal data</h1>
            <form class="k-form">
                <div class="k-form-container">
 
                    <div class="k-form-field">
                        <label>Name: <input type="text" id="drop"></label>
                    </div>
                    <div class="k-form-field">
                        <label>Surname: <input type="text"></label>
                    </div>
                </div>
            </form>
        </div>
        <div>
            <h1>Contacts data</h1>
            <form class="k-form">
                <div class="k-form-container">
                    <div class="k-form-field">
                        <label>Telephone: <input type="text"></label>
                    </div>
                    <div class="k-form-field">
                        <label>Mail: <input type="text"></label>
                    </div>
                </div>
            </form>
        </div>
    </div>
 
    <script>
        $("#wizard").kendoWizard({
            steps: [{
                title: "Welcome",
            }, {
                title: "Personal Details",
            }, {
                title: "Contact Details"
            }]
        });
    </script>

 

Misho
Telerik team
 answered on 09 Feb 2021
3 answers
4.3K+ views

Hi I'm getting a JS error when trying to using cascading dropdowns (defined below)

@(Html.Kendo().DropDownList()
 .Name("makes")
 .HtmlAttributes(new { style = "width:100%" })
 .OptionLabel("Select make...")
.DataTextField("text")
 .DataValueField("value")
 .DataSource(source =>
 {
  source.Read(read =>
  {
   read.Url("/NoMatchVehicle/GetMakeValues");
  });
   })
  )
 
@(Html.Kendo().DropDownList()
  .Name("models")
  .HtmlAttributes(new { style = "width:100%" })
  .OptionLabel("Select model...")
   .DataTextField("text")
   .DataValueField("value")
  .DataSource(source =>
  {
 source.Read(read =>
  {
  read.Url("/NoMatchVehicle/GetModelValues?make=");
  read.Data("makes");
 
  })
  .ServerFiltering(true);
  })
  .CascadeFrom("makes")
  .Enable(false)
  .AutoBind(false)
  )

 

The first dropdown is populated fine but upon the selection on the first dropdown I get a JS error 

 

jquery.js:8641 Uncaught RangeError: Maximum call stack size exceeded
    at Function.isArray (<anonymous>)
    at buildParams (jquery.js:8641)

Any Ideas on why this could be happening I am basing this of this example 

warren
Top achievements
Rank 1
 answered on 09 Feb 2021
1 answer
104 views
Is it possibly to swap the date and time columns, so the date will appear on the left and vice versa?
Aleksandar
Telerik team
 answered on 05 Feb 2021
6 answers
1.3K+ views

I have two different editor templates I want to use with the columns in my grid. When the page first initializes I have code that will choose the correct editor name, like this:

.EditorTemplateName(Model.IsUnique ? "UniqueEditor" : "Date");

 

This part works fine, but I have a scenario where if the user changes the value in a drop-down I need to swap the EditorTemplateName to use the other one. So basically assume when the page loads that Model.IsUnique = false so it gets assigned the default 'Date' editor, I want to be able to swap that out and use 'UniqueEditor' when they choose a particular value from a dropdown change event. Is this possible?

 

thanks

 

 

Neli
Telerik team
 answered on 04 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?