Telerik Forums
UI for ASP.NET Core Forum
4 answers
460 views

Standard grid filtering options done as shown in this demo page: http://demos.telerik.com/aspnet-mvc/grid/filter-menu-customization

But it doesn't work. Here is my grid:

@(Html.Kendo().Grid<UserModel>()
    .Name("Items")
    .DataSource(dataSource => dataSource
        .Ajax()
        .Destroy(delete => delete.Action("DeleteGridItem", @ViewContext.RouteData.Values["controller"].ToString()))
        .PageSize(25)
        .Update(update => update.Action("Save", @ViewContext.RouteData.Values["controller"].ToString()))
        //.ServerOperation(true)
        .Sort(sort => sort.Add("Name"))
        .Read(read => read.Action("LoadGrid", @ViewContext.RouteData.Values["controller"].ToString())))
    .ToolBar(tools =>
    {
        tools.Custom().Text("Clear Filter").HtmlAttributes(new { id = "gridAllFilterReset" });
        tools.Excel().Text("Excel");
    })
    .Excel(excel => excel
        .AllPages(true).FileName($"{ViewContext.RouteData.Values["controller"].ToString()}.xlsx").Filterable(true)
    )
    //.EnableCustomBinding(true)
    .Columns(columns =>
    {
        columns.Bound(x => x.Name);
        columns.Bound(x => x.Email);
        columns.Bound(x => x.Departments);
        columns.Bound(x => x.Titles);
        columns.Command(command =>
        {
            command.Custom("Edit").Text("<span class='k-icon k-edit'></span>").Click("editRecord");
            command.Destroy().Text(" ");
        }).Width(250);
    })
    .Filterable(f => f.Operators(o => o.ForString(x => x
                .Clear()
                .Contains("Contains")
                .IsEqualTo("Is Equal To")
                .StartsWith("Starts With")
                .EndsWith("Ends With")
                .DoesNotContain("Does Not Contain")
                .IsNotEqualTo("Is Not Equal To")
                .IsEmpty("Is Empty")
                .IsNotEmpty("Is Not Empty"))))
    .Sortable(x => x.AllowUnsort(false))
    .Pageable()
    .Deferred()
 
)

 

 

But when I load the grid, the default filter options for string still apply

Danail Vasilev
Telerik team
 answered on 20 Oct 2016
1 answer
204 views
Model binding is not working with post values from Kendo UI MCV Grid, I follow the MVC5 example about this topic, the grid shows the editable collection but when I post the values the view model collection is always null.

 

  @(Html.Kendo().Grid(Model.Profile.CollectionOption)
                                      .Name("colOptions")
                                      .Columns(columns =>
                                      {
                                          columns.Bound(p => p.Id).Hidden();
                                          columns.Bound(p => p.ModuleId).Hidden();
                                          columns.Bound(p => p.Module.Name).Title("Modulo");
                                          columns.Bound(p => p.Name).Title("Opcion");
                                          columns.Bound(p => p.Selected).Title("Seleccionar").ClientTemplate("<input type='checkbox' #= Selected ? checked='checked' :'' # />"); ;
                                      }
                                      )
                                      .Editable(editable => editable.Mode(GridEditMode.InCell))
                                      .DataSource(dataSource => dataSource
                                              .Ajax()
                                              .Model( m =>
                                              {
                                                  m.Field(p => p.Id).Editable(false);
                                                  m.Field(p => p.ModuleId).Editable(false);
                                                  m.Field(p => p.Module.Name).Editable(false);
                                                  m.Field(p => p.Name).Editable(false);
                                                  m.Field(p => p.Selected);
                                              }
                                              )
                                              .ServerOperation(false)
                                       )
                                )

Eyup
Telerik team
 answered on 20 Oct 2016
1 answer
157 views
Here is the markup:
<div kendo-chart='chart1' k-data-source="WidgetDatasource3" k-title="{ text: 'Comments per day', visible: true, align:'left' }" k-legend="{visible:true}" k-series-defaults="{type: 'bar', labels: {visible: true, background: 'transparent'}}" k-category-axis="{ field: 'sales', name: 'Sales', type: 'number'}"  k-series="[{field: 'sales', name: 'Sales', dataType:'number'}]" ></div>

Here is the datasource:

widget3.WidgetData.Resultset = "[{ sales: 200},{ sales:450}]";

The output is attached.  Any number over 9 is being broken up.  i.e. 19 ==> 1   9


Please advise.
Stanimir
Telerik team
 answered on 18 Oct 2016
4 answers
367 views
I try to set fix categories in my kendo chart for all day of week, also when didn't have value and I just want the 5 days of european weeks like monday to friday. Second problem, I can't set culture to have the name of day in french.

        @(Html.Kendo().Calendar()
            .Name("calendar")
            .Value(DateTime.Now)
            .Format("dd/MM/yyyy")
            .Events(e => e.Change("refreshGrid"))
        )
    </div>
    @(Html.Kendo().Chart<RapportTache>()
            .Name("chart")
            .Title("Rapport de la semaine")
            .Legend(legend => legend
                .Position(ChartLegendPosition.Top)
            )
            .DataSource(ds => ds
                        .Read(read => read.Action("Chart_Read", "Saisie").Data("getDateTime"))
                        .Group(group => group.Add(model => model.TacheLibelle))
                        .Sort(sort => sort.Add(model => model.RapportTacheJourDate).Ascending())
                        )
            .Series(series =>
            {
                series.Column(model => model.RapportTacheJourDuree, categoryExpression: model => model.RapportTacheJourDate).Stack(true);
            })
            .CategoryAxis(axis => axis
                .Labels(labels => labels
                    .Culture("fr-FR")
                    .DateFormats(formats => formats
                        .Days("dddd dd")
                    )
            )
            .MajorGridLines(lines => lines.Visible(false))
        )
        .SeriesColors(
            "#cd1533", "#d43851", "#dc5c71", "#e47f8f", "#eba1ad",
            "#009bd7", "#26aadd", "#4db9e3", "#73c8e9", "#99d7ef"
        )
        .ChartArea(h => h.Height(300))
        .ValueAxis(axis => axis.Numeric()
            .Labels(labels => labels.Format("{0:N0}"))
            .MajorUnit(10)
            .Line(line => line.Visible(false))
        )
        .Tooltip(tooltip => tooltip
            .Visible(true)
            .Template("#= dataItem.RapportTacheJourDuree # (heures) : #= dataItem.TacheLibelle #")
        )
    )

And this is the actual result : 

[![enter image description here][1]][1]


  [1]: http://i.stack.imgur.com/xa3pP.png



In the actual situtation, I just have the monday on null value. If anyone have an idea, thank's for help ! :)
Philippe
Top achievements
Rank 1
 answered on 10 Oct 2016
3 answers
197 views

I've just started an ASP.NET core project, and installed the UI for ASP.NET core library from the nugget package and added in the scripts and styles folder.

This seems all to be working (I can display a datepicker on the home view).

However, when clicking the add controller context menu, I now get the Telerik Add Scaffold dialog box, which does not have an option for a plain controller (screen shot attached).

When I choose the UI for MVC Grid option, I'm unable to choose a dataContext class, even though one exists (using EntityFramework Core).

 

Veselin Tsvetanov
Telerik team
 answered on 06 Oct 2016
1 answer
197 views

Is there a way to localize the apply button or to access to the text of the Apply button ? (and cancel of course)

I'm using Asp.net Core MVC application with Kendo.MVC 2016.2.617 version.

Best regards

 

Ianko
Telerik team
 answered on 04 Oct 2016
1 answer
310 views

Basically I need to set the width of the input role="listbox" class="k-textbox" to 100% because it is wider than the widget.

Any help?

Veselin Tsvetanov
Telerik team
 answered on 03 Oct 2016
1 answer
100 views

I love the elegance of the new tag helpers, but the jQuery code itself is running inline on the widget which forces me to load jQuery\kendo at the top of the page

Is there a way to change where the script markup is generated\rendered?

Bozhidar
Telerik team
 answered on 26 Sep 2016
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?