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

     I started using the TreeList and this happens:

  • I have a list of items (columns: Name and CreatedDate)
  • I sort the list by CreatedDate DESC
  • The order of the items updates accordingly
  • I click on an item and view the details page
  • Go back to the list
  • The order is reset again

Is it possible to save the current order so that when you go back to the list it remembers the changes you made?

Anton Mironov
Telerik team
 answered on 13 Oct 2020
1 answer
111 views

I want to bring up the print dialog as soon as the PDF is loaded.

I am using 

pdfViewer.execute({ command: "PrintCommand" });

 which works fine from a button.

However it fails when I use it from the onRender event.

Putting an alert in the event appears to show the event is fired before the PDF is rendered to screen.

Is there another way to do this?

 

Martin
Telerik team
 answered on 13 Oct 2020
2 answers
126 views

Hello, I am trying to reorder/sort items in my TreeList but it doesn't seem to work like this demo:

https://demos.telerik.com/aspnet-core/treelist/dragdrop

 

Every time I drag an items it looks like i can only add it to a parent but I can't drop it in a new position (see attached video).

So I have two questions:

  1. How to enable the drop in between items?
  2. How to disable to parent  functionality (I only need to allow the reordering on the same level)

Here's the code:

01.@(Html.Kendo().TreeList<SchoolInfoSectionViewModel>()
02.    .Name("treelistschool")
03.    .Columns(x =>
04.    {
05.        x.Add().Field(e => e.SectionId).Title(" ")
06.            .Template($"<div class=\"d-inline-flex\" role=\"group\">" +
07.                      $"<a href=\"../SchoolInfo/Edit/#= SectionId #\" class=\"btn btn-sm btn-secondary mr-1\">" +
08.                      $"<i class=\"fa fa-pencil\"></i></a>" +
09.                      $"<span class=\"text-muted mr-1\">|</span>" +
10.                      $"<a href=\"\\#\" data-val=\"#= SectionId #\" class=\"btn btn-sm btn-danger mr-1\" data-toggle=\"modal\" data-target=\"\\#deleteModal\">" +
11.                      $"<i class=\"fa fa-trash\"></i></a></div>")
12.            .Width(120)
13.            .Filterable(false);
14. 
15.        x.Add().Field(e => e.SchoolInfoContent.ContentTitle).Title("Section Title")
16.            .Template($"<a href=\"../SchoolInfo/Detail/#= SectionId #\" >#= SchoolInfoContent.ContentTitle #</a>");
17. 
18.    })
19.    .Editable(editable => editable.Move(true))
20.    .Reorderable(true)
21.    //.Filterable()
22.    //.Sortable(true)
23.    //.Toolbar(toolbar => toolbar.Search())
24.    //.Toolbar(t => t.Custom().Name("btncreateschool").Text("+ Create new section"))
25.    //.Search(x => x.Field(f => f.SchoolInfoContent.ContentTitle))
26.    .DataSource(x =>
27.            x.Read(read => read.Action("AllSchool", "SchoolInfo"))
28.            .Model(m =>
29.            {
30.                m.Id(f => f.SectionId);
31.                m.ParentId(f => f.ReportsTo).Nullable(true);
32.                m.Expanded(false);
33.                m.Field(f => f.UpdatedBy);
34.                m.Field(f => f.SchoolInfoContent.ContentTitle);
35.                m.Field(f => f.UpdatedOn);
36.                m.Field(f => f.IsPublished);
37.            })
38.    ))
Tsvetomir
Telerik team
 answered on 13 Oct 2020
3 answers
321 views
Greetings.
I created partial view (editable grid with pop-up) of uploaded files.
Kendo Upload element is in pop-up window.
This partial view works well on all views, except one.
When I inspect upload element in browser in that "non-working" view it shows <input type="file"> instead of <div class="k-widget k-upload k-upload-async ...> like in "working" views and uploading logic doesn't work at all.
Can you help me with this issue?
Thanks
Best regards, Yauheni
Yauheni
Top achievements
Rank 1
Veteran
 answered on 13 Oct 2020
5 answers
476 views

I created a group line chart with the ValueAxis defined as below:

The actual data would be decimal 4.00, 4.20, 4.90, 5.00. 5.50 ....

 

.ValueAxis(axis => axis.Numeric().Labels(labels => labels .Format("{0}").Skip(2).Step(2)))

So the chart is generated as attached. 

Now we do not want to display 0, 1, 2, 3, 4, 5 ... but want to display 

A, B, C, D, E, F ... 

where A replace 0, B replace 1, ...

We are using UI for ASP.NET Core

How would do we do this?

 

 

Also, if there are multiple records for a given date for an account with difference value, only one will be selected and display on the chart. Is there a way to display all? 

e.g Account 123 on July 21, have two records, one with value of 4 and one with 3, only one of the value will be on the chart.

 

Thanks.

 

 

 

 

 

Tsvetomir
Telerik team
 answered on 09 Oct 2020
1 answer
329 views
How do I use my own .gif in the grid while it is loading?
Georgi Denchev
Telerik team
 answered on 08 Oct 2020
1 answer
117 views

hi,

I use

@(Html.Kendo().TreeList<SchoolInfoSectionViewModel>()

...

...

.Editable(editable => editable.Move(true))
.Reorderable(true)

.Sortable(true)

...

in the code.

 

When I drag the item it not show the reordering feature to reorder the same parent scope item. It only allows dragging the item into another one as a child.

Please advise what I am missing?

Thanks

 

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 07 Oct 2020
3 answers
455 views

The objective is to keep certain functions(open, download, span) off the toolbar and add other buttons to the toolbar (email, close).  Does anyone know how to add the ZoomCommand to the toolbar?

The following is what I have so far.

 

        <kendo-pdfviewer name="kendoPdfViewer" id="kendoPdfViewer">
            <pdfjs-processing file=@(Url.Content("/YourPage?handler=PdfHandler")) />
            <toolbar enabled="true">
                <pdfviewer-toolbar-items>
                    <pdfviewer-toolbar-item command="OpenCommand" type="button" name="open" icon="folder-open"></pdfviewer-toolbar-item>
                    <pdfviewer-toolbar-item command="PageChangeCommand" type="pager" name="pager"></pdfviewer-toolbar-item>
                    <pdfviewer-toolbar-item command="DownloadCommand" type="button" name="download" icon="download"></pdfviewer-toolbar-item>
                    @*The below commands have not been implemented.  Feel free to answer how the below is implemented.*@
                    @*<pdfviewer-toolbar-item command="EnableSelectionCommand"></pdfviewer-toolbar-item>*@
                    @*<pdfviewer-toolbar-item command="EnablePanCommand"></pdfviewer-toolbar-item>*@
                    @*<pdfviewer-toolbar-item command="ExportCommand"></pdfviewer-toolbar-item>*@
                    @*The above commands have not been implemented.*@
                    <pdfviewer-toolbar-item command="PrintCommand" type="button" name="print" icon="print"></pdfviewer-toolbar-item>
                    <pdfviewer-toolbar-item command="OpenSearchCommand" type="button" name="search" icon="search"></pdfviewer-toolbar-item>
                    @* How do you implement the ZoomCommand? *@
                    <pdfviewer-toolbar-item command="ZoomCommand" name="zoom"></pdfviewer-toolbar-item>
                    <pdfviewer-toolbar-item type="button" id="button1" text="Email" click="EmailClickHandler"></pdfviewer-toolbar-item>
                    <pdfviewer-toolbar-item type="button" id="button2" text="Close" click="CloseClickHandler"></pdfviewer-toolbar-item>
                </pdfviewer-toolbar-items>
            </toolbar>
        </kendo-pdfviewer>

<style>
    html body #kendoPdfViewer {
        width: 100% !important;
    }
</style>

<script>
        function EmailClickHandler(e) {
            console.log("EmailClickHandler");
        }
        function CloseClickHandler(e) {
            console.log("CloseClickHandler");
        }

    </script>

I added Open and Download just to get them working.  I will remove them before the production release.

Does someone know how to define the ZoomCommand?

Petar
Telerik team
 answered on 07 Oct 2020
2 answers
101 views

I have this control

 

 

@(Html.Kendo().DropDownTreeFor(model=>model.NewCustomerCategoryCode)
                        .DataTextField("Name")
                        .DataValueField("id")
                        .AutoWidth(true)
                        .HtmlAttributes(new { style = "width: 100%" })
                        .DataSource(dataSource => dataSource
                            .Read(read => read
                                .Action("Read_DropDownTreeNewCustomerCategoriesData", "ListBox")
                            )
                        )
                        .Filter(FilterType.Contains)
                        .LoadOnDemand(true)
                    )

 

And this is the action

public JsonResult Read_DropDownTreeNewCustomerCategoriesData(string id)
        {
            var result = GetHierarchicalNewCustomerCategoryData()
                .Where(x => String.IsNullOrEmpty(id) ? x.ParentCode == null : x.ParentCode == id)
                .Select(item => new {
                    id = item.Code,
                    Name = item.Name,
                    hasChildren = item.HasChildren
                });
 
            return Json(result);
        }

 

I set correctly a value (and stored to database), but when I reopen a card it cannot get a value correctly.

When I try to debug into Action id parameter is not valued.

Why?

 

Dario
Top achievements
Rank 1
Veteran
 answered on 06 Oct 2020
2 answers
261 views

I'm using your loader when I disable forms after an entry/submit.  But, I also use your Grid so I'd like the same "progress indicator" used while waiting for the grid datasource to return.  So, how do I make the Loader use the same animation as the Grid or how do I make the Grid use the Loader?

Joel
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 06 Oct 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?