Telerik Forums
UI for ASP.NET Core Forum
1 answer
673 views
I have a switch that I would like to bind to a model, is this possible?     
Mihaela
Telerik team
 updated answer on 25 Jul 2022
1 answer
155 views

Hello

We use Telerik UI to ASP.NET Core to build the Razor Page app.

After connecting Hebrew Localization

    <script src="~/kendo/js/jquery.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.all.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.aspnetmvc.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.culture.he-IL.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/kendo.messages.he-IL.min.js" asp-append-version="true"></script>

    <script src="~/kendo/js/jszip.min.js" asp-append-version="true"></script>

    <script>kendo.culture("he-IL");</script>

 

 

 

We get the following picture

The script file kendo.messages.he-il.js contains the following overrides

 

  /* Grid messages */

 

    if (kendo.ui.Grid) {

        kendo.ui.Grid.prototype.options.messages =

            $.extend(true, kendo.ui.Grid.prototype.options.messages, {

                "commands": {

                    "cancel": "בטל",

                    "canceledit": "בטל עריכה",

                    "create": "צור חדש",

                    "destroy": "מחק",

                    "edit": "עריכה",

                    "save": "שמור",

                    "select": "בחר",

                    "update": "עדכן"

                },

                "editable": {

                    "cancelDelete": "בטל מחיקה",

                    "confirmation": "האם הנך בטוח שברונך לבצע זאת?",

                    "confirmDelete": "אשר מחיקה"

                }

            });

    }

 

    /* Pager messages */

 

    if (kendo.ui.Pager) {

        kendo.ui.Pager.prototype.options.messages =

            $.extend(true, kendo.ui.Pager.prototype.options.messages, {

                "allPages": "All",

                "page": "עמוד",

                "display": "{0} - {1} מתוך {2} פריטים",

                "of": "מתוך {0}",

                "empty": "אין פריטים להצגה",

                "refresh": "רענן",

                "first": "לעמוד הראשון",

                "itemsPerPage": "פריטים בעמוד",

                "last": "לעמוד האחרון",

                "next": "לעמוד הבא",

                "previous": "לעמוד הקודם",

                "morePages": "עמודים נוספים"

            });

    } 

 

What we need to do to get localization at least within what is in the script?

 

Best regards

 

Mihaela
Telerik team
 answered on 21 Jul 2022
1 answer
186 views

Hi!

Why is it so difficult to have the gid set itself to 100% of the height of the container it is in? All the guides I see here are just trial and error attempts.

Here is my CSS hierarchy:

GridFullHeight.png

I need my grid to be using all available height of the container. Currently, the main grid is only taking half of the screen (450px, set internally by Kendo) and expanding the details template with a tab strip and a child grid, the look and feel just doesn't look or feel right. The child grid doesn't need to have extra length. In fact, it should do the reverse: max height just enough to show all rows and not a pixel more. How do I set this up?

Mihaela
Telerik team
 answered on 21 Jul 2022
1 answer
133 views

Hello,

Is there a way to add comments in ASP.NET Core Editor just like how you are able to on ASP.NET AJAX.

I see that I am able to use Telerik Document Processing to open a docx file and  add comments on there, but I want to be able to do that on the Editor.

 

Thank you,

Mihaela
Telerik team
 answered on 18 Jul 2022
1 answer
151 views

Hi There

I have a Grid that placed in a boostrap modal.

In this grid, there is an in cell edit column with a DropDownList as client template.

The DropDownList is not displayed, only the input box and the data is shown when enter edit mode of the cell.

No problem when placing the grid on the main body, outside the modal.

Can anyone help on how I can have the dropdownlist shown ? thanks in advance.

Alexander
Telerik team
 answered on 18 Jul 2022
5 answers
3.1K+ views

Scenario - Asp.net Core, Razor Pages     

If i have no Controller (using razor pages), is there a way to bind a column to a clientTemplate that contain some sort of Action Link or Navigation link?

I need this so a user can simple click on a link on a row in the grid whicj then does the usual "Edit, Details, Delete"

 

If i was to not have telerik grid and just us a table it would look like this:

 <td>
                <a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-page="./Details" asp-route-id="@item.Id">Details</a> |
                <a asp-page="./Delete" asp-route-id="@item.Id">Delete</a>
            </td>
        </tr>
}
    </tbody>
</table>

 

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 15 Jul 2022
1 answer
146 views

Hi!

I have this scenario where I want to forward the current model's sub-object as a model to a DisplayTemplate within the Grid's ClientDetailTemplate: Checkout the first Tab of the TabStrip in the ClientDetailTemplate

Main View:

@(Html.Kendo().Grid(Model)
      .Name("gridLetters")
      .Columns(columns =>
      {
	      columns.Bound(p => p.Id).ClientTemplate("<a href='" + Url.Action("View", "Letter", new { letterId = "#:Id#" }) + "'>#=Id#</i></a>");
	      columns.Bound(p => p.Subject);
	      columns.Bound(p => p.CompanyName).Title("Company");
	      columns.Bound(p => p.BrandName).Title("Brand");
	      columns.Bound(p => p.Location.Name).Title("Location");
	      columns.Bound(p => p.LetterType.Name).Title("RL Type");	      
      })
      .ToolBar(toolbar =>
      {
	      toolbar.Search();
      })
      .Sortable()
      .Navigatable()
      .Resizable(r => r.Columns(true))
      .Pageable(pageable => pageable
	                .Refresh(true)
	                .PageSizes(true)
	                .ButtonCount(5))
      .Filterable()
      .Scrollable()
      .ClientDetailTemplateId("detailTemplate")
      .HtmlAttributes(new { style = "height:430px;" })
      .DataSource(dataSource => dataSource
	                  .Ajax()
	                  .Sort(x => x.Add("Id").Descending())
	                  .PageSize(20)
	                  .ServerOperation(false)
	  ))

@section Scripts {
	<script id="detailTemplate" type="text/kendo-tmpl">
	    @(Html.Kendo().TabStrip()
	          .Name("tabStrip_#=Id#")
	          .SelectedIndex(0)
	          .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
	          .Items(items =>
	          {
		          items.Add().Text("History").Content(@<text>@Html.DisplayFor(m => m.History, "LetterHistory")</text>);
		          items.Add().Text("Details").Content("");
	          }).ToClientTemplate())
	</script>
}

Above, the model for the main grid is an IList of my objects. Each object has a History property of type

BusApp.Domain.Models.BusinessObjects.LetterActionHistoryFlatModel

I need to get that property passed on as a model for the DisplayFor

LetterHistory.cshtml

@model IList<BusApp.Domain.Models.BusinessObjects.LetterActionHistoryFlatModel>

@(Html.Kendo().Grid(Model)
      .Name("gridLetterHistory")
      .Columns(columns =>
      {
	      columns.Bound(p => p.ActionStamp).Title("Stamp").Format("{0:dd-MMM-yyyy}");
	      columns.Bound(p => p.LetterActionName).Title("Action");
	      columns.Bound(p => p.ActionTakenByName).Title("Taken By");
      })
      .Navigatable()
      .Resizable(r=>r.Columns(true))
      .Pageable(pageable => pageable
	                .Refresh(true)
	                .PageSizes(true)
	                .ButtonCount(10))
      .Filterable()
      .Scrollable()
      .DataSource(dataSource => dataSource
	                  .Ajax()
	                  .Sort(x => x.Add("ActionStamp").Descending())
	                  .PageSize(20)
	                  .ServerOperation(false)
	  )
	)

Regrds.

Mihaela
Telerik team
 answered on 14 Jul 2022
1 answer
200 views

The aspnet core binaries looked like this with the previous release. See below.

Now, it appears the net6.0 is gone.Why go backwards to netstandard2.0? Where was this explained? I feel like upgrading is a huge downgrade so I should NOT do it.

We were told this 2 years ago - https://visualstudiomagazine.com/articles/2020/09/16/net-standard-future.aspx .

Stoyan
Telerik team
 answered on 11 Jul 2022
1 answer
184 views

hello, 
what is the general pattern to include a grid inside another Grid's DetailTemplate? I have a heriarchical collections I need to populate. I don't see other way than declaring a script inside the template's script tag, but that is invalid html.

Momchil
Telerik team
 answered on 08 Jul 2022
0 answers
124 views

I have defined in my cshtml the charts with this

  • the model : Html.Kendo().Chart<MyModelClass>()
  • the datasource: 
.DataSource(ds =>
        {
            ds.Read(read => read.Action(Model.ActionMethod, Model.ControllerActionMethod).Type(HttpVerbs.Post));
            if (Model.SeriesGrouped)
            {
                //to create data groups
                ds.Group(group => group.Add(model => model.Group)).Sort(s => s.Add(m => m.Order));
            }
        })

 

The class MyModelClass is like this

public class MyModelClass
    {
        public string Group { get; set; }
        public string Category { get; set; }
        public DateTime Order { get; set; } 
      
    }

 

When all groups of my datasource has values for all axies thats work fine, by example if my datasource result is like this:

{Group:"A", Order:"01/2021", value="1000"}
{Group:"A", Order:"02/2021", value="1200"}
{Group:"A", Order:"03/2021", value="1100"}
{Group:"B", Order:"01/2021", value="2000"}
{Group:"B", Order:"02/2021", value="2200"}
{Group:"B", Order:"03/2021", value="2100"}

The chart displayed the axies in a good way, I mean the period is ordered  by date (first jan, then feb and las march) "   01/2021         02/2021            03/2021"

But when one group of the datasource result doesn't have values in a period the beahavior is diferent, the order of axies will be created depending of order of groupin that telerik chart create.  I will explain:

My datasource result is (i remove the first value to period 01/2021):

{Group:"A", Order:"02/2021", value="1200"}
{Group:"A", Order:"03/2021", value="1100"}
{Group:"B", Order:"01/2021", value="2000"}
{Group:"B", Order:"02/2021", value="2200"}
{Group:"B", Order:"03/2021", value="2100"}

then the axies on chart is displayed like this (firs feb, then march, then jan)  " 02/2021    03/2021   01/2021 "

so the result final in my implementation is like this

this problem doesn't happen when all groups has data for all axies, the field used for create the axies is a datetime.

 

 

Gabriel
Top achievements
Rank 1
 updated question on 08 Jul 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?