Telerik Forums
UI for ASP.NET Core Forum
1 answer
115 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
296 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
159 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
8 answers
460 views

I just updated our web application to the new 2020.2.513 core release. However, the css for menu items with children has changed. This causes the down icon to not show correctly. It shows as a box now which is what happens when it can't show the icon. (See attached.)

 

Old css that worked:

<span class="k-icon k-i-arrow-60-down k-menu-expand-arrow"></span>

New css that does not work:

<span class="k-menu-expand-arrow k-icon k-i-arrow-60-down"></span>

If I use the devtools of Chrome and edit the generated css to match the old css, it works again.

So, to me, it's a bug.

However, what I need asap is a way to overcome the bug for now so that the old css is used again.

Dimitar
Telerik team
 answered on 22 May 2020
9 answers
408 views

Hi,

Does anyone have a working project that demonstrates how to localize the breadcrumb component?

I have the breadcrumb working by parsing a hidden field for a property in the model populated in the controller.

 

@(Html.Kendo().Breadcrumb()
    .Name("breadcrumb")
    .Navigational(true)
    .RootIcon("home")
    .Value(Model.Breadcrumb)
)

 

It all works perfectly.  Except now, I need to localize the string values displayed in the breadcrumbs.  And of course, not disturb the the generated URL mapping to still make the links navigational to the desired controller/action.

Is this even possible using the breadcrumb component?

Thanks

Jason

 

 

 

 

 

 

Jason
Top achievements
Rank 1
Veteran
 answered on 21 May 2020
1 answer
642 views

Hi to all,

I would add a function for witch he will can sync data from his ERP, this process may be very long, but I would show him progress of this process.

I think to use notification but, I don't know if it's a good approach. I think to signalR also, but it seems too much to have only a progressive update.

 

If it's good way first thing, how can I update from action to current view (signalR????)

 

What do you suggest me to do?

Aleksandar
Telerik team
 answered on 21 May 2020
1 answer
209 views

I need to be able to handle the Drag/Drop activity.  I see no examples on how to capture the Drop or DropEnd events when doing this from an ASP.NET Core MVC application.  How do I hand off all the appropriate values to the controller?  Is this one call to both remove the node from the existing parent and register the node with the new parent?

TreeList

@(Html.Kendo().TreeList<NameValueParent>()
      .Name("treelist")
      .Columns(columns =>
      {
          columns.Add().Command(c => { c.Custom().Text("Select")
              .Name("selectButton").ClassName("selectButton")
              .Click("goDetail"); })
              .Width(Glossary.Portal.ButtonWidth);
          columns.Add().Field(e => e.Name);
          columns.Add().Width(330).Command(c =>
          {
              c.CreateChild().Text("Add");
              c.Edit();
              c.Destroy();
          })
              .HtmlAttributes(new
              {
                  style = "text-align: center;"
              });
      })
      .Events(ev => ev.DataBound("onDataBound"))
      .Editable(e => e.Move(true))
      .Selectable(s => s.Mode(TreeListSelectionMode.Single))
      .DataSource(dataSource => dataSource
          .Create(create => create.Action("Create", "Site"))
          .Read(read => read.Action("IndexJson", "Site").Data("getData"))
          .Update(update => update.Action("Update", "Site"))
          .Destroy(delete => delete.Action("Destroy", "Site"))
          .ServerOperation(false)
          .AutoSync(true)
          .Model(m =>
          {
              m.Id(f => f.Id);
              m.ParentId(f => f.ParentId);
              m.Expanded(true);
              m.Field(f => f.Name);
          }).Events(events =>
          {
              events.Error("onError");
          })
      )
    .Events(events => events.DragEnd("goDropEnd()"))
    .Height(540))

Script

function goDropEnd(e) {
    alert("goDropEnd");
    alert("I have no idea what to do here");
}
Anton Mironov
Telerik team
 answered on 20 May 2020
4 answers
459 views

Because the grid date filter is still broken (https://github.com/telerik/kendo-ui-core/issues/1864) I have to modify the filter date/time values before the request is made to the server.

I can do this for normal grid filtering by modifying the filter values in the transport parameterMap, however, when I invoke saveAsExcel() the parameterMap is not called and the wrong date/time values are sent to the server.

How can I modify the filter values *before* saveAsExcel() makes the request to the server (just as I do for normal filtering)?

 

Ivan Danchev
Telerik team
 answered on 19 May 2020
1 answer
608 views

Hi to all,

I'm trying to use a badge to show a value of enum with a color for each items.

this is a enum

public enum ContactSourceTypes
{
    [Display(Name = "Telefono")]
    Phone = 0,
    [Display(Name = "Mail")]
    Mail = 1,
    [Display(Name = "Sistema di Marketing")]
    Mautic = 2,
    [Display(Name = "Altro")]
    Other = 3
}

 

Actually it shows a Display Value of item into a grid

[...]
columns.Bound(product => product.SouceType)
[...]

 

Now, I would obtain a badge with a specific color and displayvalue of item's enum type. To do this I try to change column setup in this way.

columns.Bound(product => product.SouceType).ClientTemplate("<span id='badge_#=SouceType#' class='sourceTypeBadgeTemplate'>#=SouceType#</span>");

 

And relative script

function onDataBound(e) {
        var grid = this;
        grid.table.find("tr").each(function () {
            var dataItem = grid.dataItem(this);
 
            //Formattazione tipo origine
            var sourceType = dataItem.SouceType;
 
            var type = 'primary';
            //alert(sourceType);
            switch (sourceType) {
                case 0:
                    type = 'primaty';
                    break;
                case 1:
                    type = 'info';
                    break;
                case 2:
                    type = 'success';
                    break;
                case 3:
                    type = 'warning';
                    break;
            }
 
            var text = sourceType;
 
            $(this).find('script').each(function () {
                eval($(this).html());
            });
 
            $(this).find(".badgeTemplate").kendoBadge({
                type: type,
                value: text,
            });
 
 
            kendo.bind($(this), dataItem);
        });
    }

 

But it's wrong.....where I wrong?

 

Anton Mironov
Telerik team
 answered on 19 May 2020
1 answer
119 views

I use TreeList a lot in my Portal.  However, instead of having big buttons showing in the grid the users would like to have a context menu.  In the simplest form, I'd need to right click and get an option to go to the details or add a sub-node of the selected node.

The node Template:

<script id="icon-template" type="text/x-kendo-template">
    <div class='group-icon'
         style='background-image: url(@Url.Content("#: ImageUrl #"));'></div>
    <div class='group-name'>#: Name #</div>
</script>

My current TreeList:

@(Html.Kendo().TreeList<Group>()
      .Name("treelist")
      .Columns(columns =>
      {
          columns.Add().Field(e => e.Name).TemplateId("icon-template").Width(350);
      })
      .DataSource(dataSource => dataSource
        .Read(read => read.Action("IndexJson", "Groups").Data("getData"))
        .ServerOperation(false)
        .Model(m =>
        {
            m.Id(f => f.Id);
            m.ParentId(f => f.ParentId);
            m.Expanded(true);
            m.Field(f => f.Name);
        })
          .Sort(s => s.Add(f => f.Name))
          .Events(events => events.Error("onError"))
    )
    .HtmlAttributes(new { style = "height:550px;" })
    .Selectable(s => s.Mode(TreeListSelectionMode.Single))
    .Events(events =>
    {
        events.DataBound("onDataBound");
    }))

 

 

Viktor Tachev
Telerik team
 answered on 19 May 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?