Telerik Forums
UI for ASP.NET Core Forum
7 answers
488 views

I am using the grid to display some fields. one of the field is to display the List of usernames. I am able to display the List of user names using ClientTemplate. But Iam facing the issue while editing or adding new row. While displaying I bind the column with usenameList and pass the same in function used for ClientTemplate. While display it's working fine. but when I click on Edit/Add New it's throwing javascript error as usenameList is undefined. my requirement to to display the lit of users with option to delete them and a buuton add new user. I didn't find he option to crate a templete to sho while editing like ClientTemplate for dispaly.

 

.Columns(columns =>
    {
        columns.Bound(p => p.Name);
        columns.Bound(p => p.someId);
        columns.Bound(p => p.discontinue).
        columns.Bound(p => p.userList).Title("Approvers").ClientTemplate("#=userTemplate(userList)#").Sortable(false);
        columns.Command(command => { command.Edit().UpdateText("Save"); command.Destroy(); })
    })

 

function userTemplate(data) {
        this.approvers = "";
        data.forEach(element => {
            this.approvers += "<tr> <td style='width: 30 %; font-weight: bold'>" + element.userID+ "</td> <td>" + element.Display Name +</td></tr>";
        });
        return "<table>" + this.approvers + "</table>";
    }

The Edit Column in grid looks like the attched. Please let me know how to do it

 

Nikolay
Telerik team
 answered on 27 May 2020
3 answers
2.0K+ views

I have found a couple solutions online if you want to use a detail view under a row in the grid control, but that is not exactly what I am looking for. I have a ASP.NET Core 2 solution and I want to be able to display "tags" that can be links in the column itself without having to do a detail drill-in. Nothing I have done to this point has worked. 

The ArtcleViewModel has a List property of Tags. Is this impossible or am I missing something? Any help to create links per tag is appreciated without the use of a drill in detail view that the user would need to click to see.

@(Html.Kendo().Grid<MBIntranet.Web.ViewModel.ArticleViewModel>()
            .Name("grid")
            .Columns(columns =>
            {
                columns.Bound(c => c.Title).Title("Title");
                columns.Bound(c => c.User.DisplayName).Title("Author");
                columns.Bound(c => c)
                    .ClientTemplate("#= data.Tags[0].Name #")
                    .Title("Tags");
Alex Hajigeorgieva
Telerik team
 answered on 26 May 2020
1 answer
146 views

Hi to all,

I'm trying to set k-success into a custom command but it's not effect, qhy?

My definitions

columns.Command(command => command.Custom("Conforme").Visible("isCompleted").Click("validContact")).HtmlAttributes(new { @class = "k-success" });columns.Command(command => command.Custom("Non Conforme").Visible("isCompleted").Click("notValidContact")).HtmlAttributes(new { @class = "k-danger" });

 

I attach the effect

Silviya Stoyanova
Telerik team
 answered on 26 May 2020
1 answer
104 views

Hi to all,

I need to hide a button base a model's view.

But I can't do this.

hide() and show() methods seems wrong.

 

 

Neli
Telerik team
 answered on 26 May 2020
1 answer
638 views

Hi,

I am using .net core tag helpers to display a grid with inline editing.

I am able to display Icon only commands for Edit and Delete. But I am struggling to find any documentation to customize the same behaviour for Update/Cancel

 

<kendo-grid name="grid" height="550" resizable="true">
    <datasource page-size="100" type="DataSourceTagHelperType.Ajax" server-operation="true" name="dataSource" batch="true">
        <transport>
            <read url="/Test/read" type="post"  />
            <update url="/Test/create"  />
            <destroy url="/Test/delete"  />
            <create url="/Test/create"  />
        </transport>
        <schema>
            <model id="Id">
                <fields>
                    <field name="FirstName">
                        <validation required="true" />
                    </field>
                    <field name="LastName"></field>
                    <field name="Email"></field>
                </fields>
            </model>
        </schema>
    </datasource>
    <sortable enabled="true" />
    <filterable enabled="true" extra="false">
        <operators>
            <string eq="Is equal to" contains="Contains" startswith="Starts with" neq="Is not equal to" />
        </operators>
    </filterable>
    <pageable button-count="5" refresh="true" page-sizes="new int[] { 10,20 }" />
    <editable mode="inline" />
    <columns>
        <column width="75">
            <commands>
                <column-command name="edit" template="#=edittemplate(data)#">
                </column-command>
                <column-command name="destroy" template="#=deletetemplate(data)#"></column-command>
            </commands>
        </column>
        <column field="FirstName" title="FirstName" width="50"></column>
        <column field="LastName" title="LastName" width="50"></column>     
        <column field="Email" title="Email" width="75"></column>
    </columns>
</kendo-grid>
 
edittemplate = function (data) {
    var template = '<button type="button" class="k-button k-button-icon"><span class="k-icon k-i-update"></span></button>';
    return template;
};
Nikolay
Telerik team
 answered on 25 May 2020
2 answers
239 views

Hi,

Im trying to setup Kendo with an existing application in order to do a demo for a Client

I followed this guide
https://docs.telerik.com/aspnet-core/getting-started/first-steps#configuration

Everything is added but Im getting a runtime error whenever I try to start the application

Here is some information

The application is on Core 3.1
http://i.imgur.com/2b4ppyf.png

The version nuget is getting is 

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

The application is compiling but as soon it tries to had the Kendo to the container Im getting this issue

http://i.imgur.com/K7j2NGM.png

I'm using VSCode on linux
http://i.imgur.com/M7Am1Fi.png

I saw some post about trial version not being compatible with 3.1 but I am not on trial.

Let me know what we are doing wrong.

Cheers

 

Yannick
Top achievements
Rank 1
Veteran
 answered on 22 May 2020
1 answer
215 views

Hello Support,

I have facing some issue in bar chart. Actually data is too long in chart so i have assign category axis maximum showing 10 records but each record exits on many data so my graph is not open in zoom mode.

Can you please suggest how i can solved this problem? we are using asp.net core not jquery.I have attached some screenshots

Another requirement, how to add feature zoom in zoom out on button click not mouse scrolling of google chrome zoom in zoom out using.

Please respond ASAP.

 

Silviya Stoyanova
Telerik team
 answered on 22 May 2020
1 answer
107 views

Hi,

When you have a recurring item in a scheduler and you hit the x , you get the delete dialog box which asks

  • "Delete current occurrence" or
  • "Delete the series"

 

I would like it so that if you choose delete the series,I don't want to delete ones that have already happened and have an exception rule on them.  I can handle this server side, but right now when it hits my server, i don't know which of these options was chosen.

Is there anything I can hook into to post back to my method to say whether delete current occurrence or delete whole series was clicked?

Alternatively, is there another way to achieve this.

 

 

Thanks in advance.

Cheryl

Petar
Telerik team
 answered on 22 May 2020
4 answers
286 views

Hi to all,I'm trying to use a chart into a TileLayout.

my code

<script id="newcontacts-template" type="text/x-kendo-template">
    @(Html.Kendo().Chart<Portale.Web2.Models.RolePages.ContactCount>()
        .Name("newContactChart")
        .Title("Nuovi contatti per provenienza")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Top)
        )
        .DataSource(ds => ds.Read(read => read.Action("NewContactRolePage", "Home")))
        .Series(series => {
            series.Bar(model => model.Count).Name("Nuovo Contatti").CategoryField("Category");
        })
        .CategoryAxis(axis => axis
            //.Labels(labels => labels.Rotation(-90))
            .Crosshair(c => c.Visible(true))
        )
        .ValueAxis(axis => axis.Numeric()
            .Labels(labels => labels.Format("{0:N0}"))
        )
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Shared(true)
            .Format("{0:N0}")
        )
        .HtmlAttributes(new { style = "height:100%;width:100%;" })
        .ToClientTemplate()
    )
</script>
<div class="row">
    <div class="col">
        @(Html.Kendo().TileLayout()
        .Name("rolepagetilelayout")
        .Columns(2)
        .Containers(c => {
            c.Add().Header(h => h.Text("Nuovi Contatti")).BodyTemplateId("newcontacts-template").ColSpan(2);
        })
        .Reorderable(true)
        .Resizable(true)
        .Events(e=>e.Resize("onTileResize"))
    )
    </div>
</div>

 

chart not resized, why?

 

Alex Hajigeorgieva
Telerik team
 answered on 22 May 2020
1 answer
153 views
How does one do a 'Cancel' on a Form widget. I see the events for Submit / Clear / Validate. It looks like the only way to leave a form is to submit it.
Dimitar
Telerik team
 answered on 22 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?