Telerik Forums
UI for ASP.NET Core Forum
1 answer
969 views

I love using all the kendo widgets you offer. But why is the drawer component so hard to use?

My approach is to use a global navigation sidebar. Currently I'm using the panelbar as navigation but somehow I have the feeling that the kendo panelbar was never intended to be a navbar.

So I looked again in the demos and saw the drawer. As described in the introduction it is intended to be used as a side navigation. Also I figured out that the left sidebar on the demo pages (where you can navigate through the available widgets kendo offer) is a drawer too. So I thought hey, maybe it is just the thing you need right now!

But then I tried to implement it in my app and it is a mess compared to all the other available kendo components. Just a few things I noticed, maybe somebody can answer me the points:

  1. Why is the widget automatically configured to use a "content"? When not defining a content (because I want the widget just for navigation, not for showing any content by clicking on a item because the widget should only navigate me to other pages), I have to mess with the css that the space for the content is disapearing (see in the picture).
  2. Why this widget doesn't support to create the items via razor syntax? A lot of other components support to add its items through razor via ".Items(x => x.Add().Text("Home"))". Here I have to configure so much html to create a simple, small and lightweight menu via ".Template(@"[..]")".
    In addition, the kendo panelbar supports even to add an action behind every item through ".Action("Index", "Home")" (exactely what I need and what I'm using right now).
  3. Why is the collapsing of a submenu not integrated in the component? In the demo under "Hierarchy" I have to register the "ItemClick"-event and have to insert the whole logic for collapsing in javascript. Yes, you provided a working script but why it isn't a built-in feature of the component?
  4. Or maybe I'm wrong and the drawer is not the component I'm searching for? In my opinion the drawer is comparable to a vertical tabstrip where all the content is already existing in background and after clicking on an item the content will be shown. It's not really working like a navigation bar which will provide you to the set url. Somehow I wonder why I am the only one who wants a simple sidebar navigation with hierarchy, where it will redirect me to the page by clicking on its item.

In the second picture you see the super easy to use panelbar as my current navigation bar in my application compared to the drawer I tried to integrate. Like I said I have the feeling the panelbar component is not intended to be a navbar. Also it has a bug which I already reported to you and which is pretty annoying (https://github.com/telerik/kendo-ui-core/issues/6528).

Mihaela
Telerik team
 answered on 01 Nov 2021
1 answer
972 views
Hi,

Is there any way to disable the entire grid?
the scenario is when the page was browsed in the first time,
I used a parameter with if statement to jumpover the grid from showing cloumns.
After the user enters the search parameter, the grid showed up with data.
What if there is no data, how can I disable the entire grid?
Petar
Telerik team
 answered on 27 Oct 2021
1 answer
154 views

Hi,

is it possible to have a standalone column-chooser in ASP.Net Core Telerik UI, like shown here in Angular UI?:

https://www.telerik.com/kendo-angular-ui/components/grid/columns/menu/#toc-standalone-column-chooser

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 26 Oct 2021
1 answer
218 views

Hi,

is it possible to change order of column menu items?

By default menu items are like this:
1. Sorting
2. Columns show/hide
3. Filtering

I would like to change that ordering to (for example):
1. Filter
2. Columns
3. Sort ascending
4. Sort descending

Petar
Telerik team
 answered on 26 Oct 2021
1 answer
86 views

I have a grid similar to this where the first column is a label and the other columns are years.

            2020    2021

Apps    2,000   3,000

Orgs     3,000   7,000

Total    5,000   10,000

% Chg               50%

I would like for the numbers to be formatted as they are above. That is, in all of the rows except the last one numbers are formatted with comma separators, and in the last row numbers are formatted with a trailing %.

Is there a way to conditionally format the numbers depending on the row?

Thanks,

Tim

Tim
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 25 Oct 2021
1 answer
364 views

Hi, 

I'm working on develop web application using MVC Core (razor). One of the view will have column with running total from previous row (see picture below) . I try to use Kendo Grid (GridEditMode.InCell) to do the job and write some codes to save to database but I cannot get amount from previous row to display. The first row the users enter the number to start and the row after that will need to get the amount from previous pulse the number from column b, c, d.

Do you have any recommendation what is the better tools or widgets to use to handle all these requirement? Thank you. 

Stoyan
Telerik team
 answered on 22 Oct 2021
1 answer
101 views

Hello

I'd like to keep the popup of a FloatingActionButton open after clicking one of the items.

The function preventDefault() is not available for the click event of the items.

Thanks and best regards,

Christine

Alexander
Telerik team
 answered on 21 Oct 2021
1 answer
162 views
Hello,
I'm starting a daterangepicker for filtering my datas,
as i select the time range,
say like selecting start time: 2021/10/18 to end time: 2021/10/19
while i checked the value it turns out to be 2021/10/18 12:00:00 to 2021/10/19 12:00:00.
The issue here is how can i change the selected value to 2021/10/18 00:00:00 to 2021/10/19 00:00:00?
Aleksandar
Telerik team
 answered on 21 Oct 2021
2 answers
169 views

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

Tsvetomir
Telerik team
 answered on 21 Oct 2021
2 answers
942 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>

Tsvetomir
Telerik team
 answered on 20 Oct 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?