Telerik Forums
UI for ASP.NET Core Forum
0 answers
65 views

In our UI for ASP.NET Core R3 2020 (2020.3.915) release, the Column menu message of unsticking a column is "null".

This bug will be resolved in our next official release.

In the meantime, as a workaround, manually set the Unstick Column menu message:

.ColumnMenu(c => c.Messages(m => m.Unstick("Unstick Column")))
Kendo UI
Top achievements
Rank 1
 asked on 16 Sep 2020
0 answers
1 view

Hello,

I've created an Index screen with a Grid, but I want to be able to fill and submit some search criteria before the Read action occurs, then use those values in the Action method on the controller. I've set auto-bind="false" for the Grid.

My Grid has a data source:

    <kendo-datasource name="dataSource1" type="DataSourceTagHelperType.Ajax" server-operation="false" page-size="20">
        <transport>
            <read url="@Url.Action("TblPart_Read", "TblPart");" data="searchData" />
        </transport>
    </kendo-datasource>

    function searchData() {
        return {
            search: $("#txtSearch").val(),
            archived: $("#chArchived").prop('checked')
        };
    }

The searchData consists of textbox and checkbox values.

The controller action is as follows:

        public async Task<ActionResult> TblPart_Read([DataSourceRequest] DataSourceRequest request)
        {
            var service = new TblPartService(_context);
            // omitted, but this is where I will filter the result based on the searchData

            return Json(result);
        }

How do I:

  • Make the Grid display the filtered data when the form is submitted
  • Retrieve searchData in the controller action?

Many thanks,

Richard

Richard
Top achievements
Rank 1
Iron
 asked on 18 Oct 2021
1 answer
4 views

How do you get the date picker to display the initial value when it is in a wizard?

This code is from the demo and not inside a wizard so it works:

<div class="demo-section k-content">
        <h4>Show e-mails from:</h4>
        @(Html.Kendo().DatePicker()
              .Name("datepicker")
              .Value("10/10/2011")
              .HtmlAttributes(new { style = "width: 100%", title = "datepicker" })
        )  
</div>

In the following code it is in a wizard and it does not display the initial value. 

 s.Add<Contract>()
                .Title("Email details")
                .Form(f => f
                    .Validatable(v =>
                    {
                        v.ValidateOnBlur(true);
                        v.ValidationSummary(vs => vs.Enable(false));
                    })
                    .FormData(Model.Contractor.Contracts)
                    .Items(items =>
                    {
                        items.Add()
                          .Field(p => p.StartDate)
                          .Label(l => l.Text("Start Date"))
                          .Editor(e =>
                          {
                              e.DatePicker()
                                   .Name("Startdatepicker")
                                   .Value("10/20/2011")
                                   .HtmlAttributes(new { style = "width: 100%", title = "datepicker" });
                          });                      
                    })
                    )
                    .Buttons(b =>
                    {
                        b.Previous();
                        b.Next();
                    });

Aleksandar
Telerik team
 answered on 18 Oct 2021
1 answer
7 views

I haven't been able to find and docs or samples on this.

I have a checkbox on an ASP.NET Core View page. 

When checked it should set two button groups to unselected (may not be correct terminology) and hide two div classes that display text.

The div classes are displayed based on the two button selections.

Problem is I can't seem to find anything that shows how to capture an onclick event for the Kendo().Checkbox.

Is this possible?

 

TIA

Alexander
Telerik team
 answered on 18 Oct 2021
1 answer
8 views

Hello, I'm trying to add a date filter to a dynamic column but my filter it's not applied, always apply the default string filter.

This is my current code to create the grid: 

And this is current result:

 

Is there any way to implement this(date filter in dynamic grid)?

BR, Miguel Machado


 

Tsvetomir
Telerik team
 answered on 18 Oct 2021
1 answer
7 views

Hi guys,

I am using Kendo UI  Upload to upload files the upload works fine however there are two things I am facing... I am using Arabic RTL Version

Now here is the problem, when I upload the files it get duplicated however, I only upload it once only. 

Secondly the remove  icon is not showing but the functionality is there just the icon not appearing....

 

I use  the following CDN links in my layout files.


    <link href="https://kendo.cdn.telerik.com/2020.1.406/styles/kendo.bootstrap-v4.min.css" rel="stylesheet" type="text/css" />
    <script src="https://kendo.cdn.telerik.com/2020.1.406/js/jquery.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.1.406/js/jszip.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.1.406/js/kendo.all.min.js"></script>
    <script src="https://kendo.cdn.telerik.com/2020.1.406/js/kendo.aspnetmvc.min.js"></script>


Also, I want to know, How I can bind The ViewModel property  name to Kendo UI Extension methods?   like we do with normal html controls using   asp-for="@Model.Student.Name"


  @(Html.Kendo().Upload()
                                      .Name("files")
                                      .HtmlAttributes(new { aria_label = "files" })
                                      .Validation(validation => validation.AllowedExtensions(new string[] { ".pdf" }))
                                      )

 

Anyone Can Help?

Aleksandar
Telerik team
 answered on 18 Oct 2021
1 answer
3 views

I used to work in ASP MVC, now I switched to ASP.NET Core, I connected all libraries and all elements.But 2 errors appear on startup: 

1) Could not load content for https://localhost:44395/lib/kendo/js/kendo.all.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

Could not load content for https://localhost:44395/lib/kendo/js/kendo.aspnetmvc.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

2) kendo is not defined


<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - service</title>
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="~/css/site.css" />

    <link rel="stylesheet" href="https://kendo.cdn.telerik.com/2021.3.914/styles/kendo.bootstrap-v4.min.css" />

</head>

<body>
...................
<footer class="border-top footer text-muted">
        <div class="container">
            &copy; 2021 - service - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
        </div>
    </footer>
    @*<script src="~/lib/jquery/dist/jquery.min.js"></script>*@
    <script src="~/lib/kendo/js/jquery.min.js"></script>
    <script src="~/lib/kendo/js/kendo.all.min.js"></script>
    <script src="~/lib/kendo/js/kendo.aspnetmvc.min.js"></script>
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="~/js/site.js" asp-append-version="true"></script>
    <script src="~/js/href.js" asp-append-version="true"></script>

    @RenderSection("Scripts", required: false)
</body>

Startup.cs:

public void ConfigureServices(IServiceCollection services)
        {
            services.AddDbContext<Context_new>(options =>
                options.UseSqlServer(
                    Configuration.GetConnectionString("DefaultConnection")));
            services.AddIdentity<LoginViewModel, IdentityRole>().AddEntityFrameworkStores<Context_new>();
            services.AddRazorPages();
            services.AddKendo();

            services.Configure<CookiePolicyOptions>(options =>
            {
                // This lambda determines whether user consent for non-essential cookies is needed for a given request.
                options.CheckConsentNeeded = context => true;
                options.MinimumSameSitePolicy = SameSiteMode.None;
            });

            services
                .AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_3_0)
                .AddNewtonsoftJson(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver());
        }

control.cshtml:


@using MvcModels.Contains
@using Kendo.Mvc.UI

<div class="container text-center">
    <div class="row">
        <h5>Панель администратора</h5>
    </div>
</div>

<div class="container">
    <div class="row">
        <div class="col-md-3">
            @(Html.Kendo().PanelBar()
                            .Name("MenuAdmin")
                            .ExpandMode(PanelBarExpandMode.Single)
                            .Items(panelBar =>
                            {
                                panelBar.Add()
                                .Text(MainPage.Users);
                                panelBar.Add()
                                .Text(MainPage.Category);
                                panelBar.Add()
                                .Text(MainPage.Parameters).Enabled(true);
                            })
            .Events(events => events.Select("menuSelectAdmin"))
            //.SecurityTrimming(true)
            )
        </div>

Вадим
Top achievements
Rank 1
Iron
 answered on 17 Oct 2021
2 answers
18 views
I'm new to programming and asp.net core. I'm trying to become a backend developer. I'm looking for a few good sample projects for ASP.NET Core. Do you know some small to medium sized Web projects for:
A traditional website that doesn't use any SPA frameworks.
Web applications that use ASP.NET Core and some SPA frameworks like Vue or React?
I don't know what such projects would look like and I'm looking to study high-quality projects, preferably aimed at people new to programming. I'm looking for something with an excellent architectural design that I can study and emulate. Plenty of docs and comments helpful to beginners would be a plus.
One more thing, I also don't know what non web applications would look like. Any recommendations for small to mid-size good quality applications?
Thanks.
brewmaxwell
Top achievements
Rank 1
Iron
 updated answer on 16 Oct 2021
1 answer
5 views

How do I code this for a razor web application. How do I code the content-url paramater? 

 

Here is an MVC example of displaying a page in a Kendo window: https://demos.telerik.com/aspnet-core/window/tag-helper 

@addTagHelper *, Kendo.Mvc

@{
    string[] actions = new string[] { "Close" };
}

<kendo-window name="window"
              title="Rams's Ten Principles of Good Design"
              draggable="true"
              resizable="true"
              width="600"
              on-close="onClose"
              content-url="@Url.Action("AjaxContent_TagHelper", "Window")"
              actions="actions">
    <content>
        loading user info...
    </content>
    <popup-animation enabled="false" />
</kendo-window>

<span id="undo" style="display:none" class="k-button">Click here to open the window.</span>

<script>
    function onClose() {
        $("#undo").show();
    }

    $(document).ready(function() {
        $("#undo").bind("click", function() {
                $("#window").data("kendoWindow").open();
                $("#undo").hide();
            });
    });
</script>

 

 

Stoyan
Telerik team
 updated answer on 15 Oct 2021
1 answer
5 views
  1. OnChange event doesn't track the cell modification after add data to the original value. (screenshot on the demo).
  2. Another question, I use the annotations on my viewmodel but it does not appear in the spreadsheet ? (same things on the site demo https://demos.telerik.com/aspnet-core/spreadsheet/datasource => [Display(Name = "Product name")] into the viewmodel but not in the spreadsheet) ? 

Regards,

Florian.

Mihaela
Telerik team
 answered on 15 Oct 2021
Top users last month
JG
Top achievements
Rank 2
Iron
ixen
Top achievements
Rank 1
Iron
Iron
Iron
Jana
Top achievements
Rank 2
Bronze
Iron
Iron
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Roland
Top achievements
Rank 1
Veteran
Iron