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

Hello everyone,

 

I have a column in my grid which contains colors.

I would like to offer the possibility for the user to filter with a color palette, instead of typing the hexadecimal value.

 

I found an example close to what I want in javascript, but I don't know how to use Kendo Color Palette instead of Color Picker :     

https://dojo.telerik.com/inawEYOH

 

Do you know how to do this in the MVC core way (using Razor) ?

 

Regards,

Christophe.

Viktor Tachev
Telerik team
 answered on 05 Sep 2018
1 answer
1.0K+ views

Hello,
I want to ask if it is supported in Kendo for ASP.NET Core, multi-select as EditorTemplate for a column in grid?

I've try it but it doesn't work like in MVC 5.

Alex Hajigeorgieva
Telerik team
 answered on 05 Sep 2018
2 answers
84 views

Hello,

I am wondering if there is a possibilty to create a `static` stacked bar.So I can put multiple Y values in the bar

Chili
Top achievements
Rank 1
 answered on 04 Sep 2018
2 answers
284 views

I have a zoomable chart with a datetime category axis.The ChartAxisBaseUnit is set to Fit.

I can zoom until I reached the milliseconds unit.

Can I limit the Max and Min Base Unit, so I can only zoom between Unit Year and Day?

 

01.@(Html.Kendo().Chart(Model.Stats.Items)
02.        .Name("temperaturechart")
03.        .Title(title => title
04.            .Text("Temperature")
05.            .Visible(true)
06.            .Position(ChartTitlePosition.Top))
07.        .Legend(legend => legend
08.            .Visible(true)
09.            .Position(ChartLegendPosition.Bottom)
10.        )
11.        .ChartArea(chart => chart
12.            .Background("transparent")
13.        )
14.        .Series(series =>
15.        {
16.            series
17.                .Line(model => model.Temperature, categoryExpression: model => model.Date)
18.                .Aggregate(ChartSeriesAggregate.Avg)
19.                .Name("Temperature");
20.        })
21.        .ValueAxis(axis => axis.Labels(label => label.Format("{0:0} °C")))
22.        .CategoryAxis(axis => axis
23.            .Date()
24.            .Labels(x => x.Rotation(310))
25.            .BaseUnit(ChartAxisBaseUnit.Fit)
26.        )
27.        .Tooltip(tooltip => tooltip
28.            .Visible(true)
29.            .Format("{0:0.0} °C")
30.        )
31.        .Pannable(pannable => pannable
32.            .Lock(ChartAxisLock.Y)
33.        )
34.        .Zoomable(zoomable => zoomable
35.            .Mousewheel(mousewheel => mousewheel.Lock(ChartAxisLock.Y))
36.            .Selection(selection => selection.Lock(ChartAxisLock.Y))
37.        )
38.)

 

Thanks,

Alex

Alexander
Top achievements
Rank 1
 answered on 04 Sep 2018
1 answer
152 views

I'm trying to use an AutoComplete component in the popup editor window for a grid.

Here's the grid code:

@(Html.Kendo().Grid<Contract>(Model.Contracts)
    .Name("contractGrid")
    .Columns(columns =>
    {
        columns.Bound(model => model.Name);
        columns.Bound(model => model.StartDate).EditorTemplateName("_DatePicker").Format("{0:dd MMM yyyy}");
        columns.ForeignKey(model => model.WithdrawalReasonId, Model.AllWithdrawalReasons, "Id", "Value");
        columns.Bound(model => model.Country).EditorTemplateName("_AutoComplete");
        columns.Command(command =>
        {
            command.Edit();
        }).Width(172);
    })
    .Events(e => e.DataBound("contractGridEdit"))
    .ToolBar(toolbar => toolbar.Create())
    .Editable(editable => editable.Mode(GridEditMode.PopUp))
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .ServerOperation(false)
        .Model(model =>
        {
            model.Id(p => p.Id);
            model.Field(p => p.ClinicianId).Editable(false).DefaultValue(Model.Id);
        })
        .Create(update => update.Action("ContractCreateAndEdit", "Clinician").AddRequestVerificationTokenData())
        .Update(update => update.Action("ContractCreateAndEdit", "Clinician").AddRequestVerificationTokenData())
    )
)

 

Here's the AutoComplete editor template (_AutoComplete.cshtml):

@using Kendo.Mvc.UI
@model object
 
@(Html.Kendo().AutoComplete()
    .Name("Country")
    .Filter("startswith")
    .MinLength(3)
    .BindTo(new string[] {
        "Albania",
        "Andorra",
        "Armenia",
        "Austria",
        "Azerbaijan",
        "Belarus",
        "Belgium" }
    )
)

 

I've tried various options for the name of theAutoComplete control but cannot get it to render in the grid popup. What am I missing?

Thanks,
Stuart.

Eyup
Telerik team
 answered on 03 Sep 2018
1 answer
914 views

I load data to grid with ajax, the first time when getting data the loader doesn't show up, BUt when data is in grid and I press refresh, then the loader is showing. I have this problem on several grids in our solution. As I must do now is to force the loader, ugly solution: kendo.ui.progress($("#grid" + gridId), true);

 

Code:

 @(Html.Kendo().Grid<HP.PartnerPortal.Web.Areas.CustomerService.Models.PartnerViewModel>()
              .Name("gridPartners")
              .Columns(columns =>
              {
                  columns.Bound(c => c.InternalPartnerId)
                      .ClientTemplate(@"<a href='" + @Url.Content("~/CustomerService/Partner/") + "#:InternalPartnerId#/Start' class='g-color-darkblue-v2 g-color-darkblue-v2--hover'>#:InternalPartnerId#</a>")
                      .Title(Localizer.L("CustomerNumber")).Width(120);
                  columns.Bound(c => c.Id)
                      .ClientTemplate(@"<a href='" + @Url.Content("~/CustomerService/Partner/") + "#:InternalPartnerId#/Start' class='g-color-darkblue-v2 g-color-darkblue-v2--hover'>#:Title#</a>")
                      .Title(Localizer.L("Title"));
                  columns.Bound(c => c.Id)
                      .ClientTemplate(@"<a href='" + @Url.Content("~/CustomerService/Partner/") + "#:InternalPartnerId#/Start'>#:AbbreviatedTitle#</a>")
                      .Width(200)
                      .Title(Localizer.L("AbbreviatedTitle"));
                  columns.Bound(c => c.PartnerType).Title(Localizer.L("PartnerType")).Width(140);
                  columns.Bound(c => c.Market).Title(Localizer.L("Market")).Width(140);
                  columns.Bound(c => c.CurrentTime).Title(Localizer.L("Current Time")).Width(140);
              })
              .Scrollable(s => s.Height(667))
              .Events(events => events
                  .DataBinding("onPartnersGridDataBinding")
              )
              .Sortable()
              .Pageable(pageable => pageable
                  .Refresh(true)
                  .PageSizes(true)
                  .ButtonCount(5))
              .DataSource(dataSource => dataSource
                  .Ajax()
                  .PageSize(50)
                  .Read(read => read.Action("_ListBySearchFilter", "Partner", new { area = "CustomerService" }))
              )
              )

 

<script>
    function onPartnersGridDataBinding() {
        var grid = $("#gridPartners").data("kendoGrid");
        var count = grid.dataSource.total();
        $("#totalPartners").html(count);
    }
</script>

Konstantin Dikov
Telerik team
 answered on 03 Sep 2018
2 answers
85 views

Adding a row after selected row in inline edit mode for Grid with Grouping is working properly in Mozilla firefox but sometimes its not working properly in Google Chrome. In Google Chrome, On adding a record after particular selection, it adds the record at different place rather than adding record after selected row but sometimes it works fine.

 

 

Please provide solution asap why its not working properly in Chrome.

 

 

Konstantin Dikov
Telerik team
 answered on 03 Sep 2018
2 answers
949 views

How can I make a filter "row" filters dropdown column text in kendo grid. For now, ]when I click on dropdown filter , its showing [Object] [object].

 

Please suggest how can I filter text from dropdown value in filterable mode row?

 

Isha
Top achievements
Rank 1
 answered on 02 Sep 2018
2 answers
308 views

Can we make a group row selected so that I can add record ist record under selected group header.

 

In this below Image1, Can I make the group header "def" selectable like as a row selectable in Image2, so that I can add ist record in that particular group on button click "Add Activity" Please provide solution asap.

 

 

 

Isha
Top achievements
Rank 1
 answered on 02 Sep 2018
7 answers
174 views

I have a method that validates if the registry is duplicated. How can I use this validation in the edit / insert popup?

 

 

 

@(Html.Kendo().Grid<Site.Models.BreedViewModel>()                                                             .Name("grid")                                                             .Columns(columns =>                                                             {                                                                 columns.Bound(b => b.BreedId).Title("ID")                                                                     .Filterable(ftb => ftb.Cell(cell => cell.ShowOperators(true))).Width(120);                                                                 columns.Bound(b => b.BreedCode).Width(140).Title("Code");                                                                 columns.Bound(b => b.BreedName).Width(220).Title("Name");                                                                 columns.Bound(b => b.Type)                                                                     .ClientTemplate("# if( Type === 1) { # <span>Beef</span> # } else { # <span>Dairy</span> # } #").Width(140);                                                                 columns.Bound(b => b.Active)                                                                     .ClientTemplate("# if( Active ) { # <span class='k-icon k-i-check-outline'></span> # } else { # <span class='k-icon k-i-close-outline'></span> # } #").Width(145);                                                                 columns.Bound(b => b.Description).Width(220).Title("Description");                                                                 columns.Command(command =>                                                                 {                                                                     command.Edit().CancelText("Cancel").UpdateText("Save").Text(" ");                                                                     command.Custom("wnDelete").Click("wnDelete").Text(" ").IconClass("k-icon k-i-delete");                                                                     command.Custom("ViewDetails").Click("ViewDetails").Text(" ").IconClass("k-icon k-i-zoom-in");                                                                 }).Width(100);                                                             })                                                             .ToolBar(t => { t.Create().Text("Add"); t.Excel(); })                                                             .Editable(editable => editable.Mode(GridEditMode.PopUp)                                                                 .DisplayDeleteConfirmation(false)                                                                 .TemplateName("BreedEdit").Window(w => w.Title("Breed")))                                                             .Scrollable(s => s.Height("auto"))                                                             .Pageable(pageable => pageable                                                                 .Refresh(true)                                                                 .PageSizes(true)                                                                 .ButtonCount(5))                                                             .Events(events => events                                                                 //.Change("onChange")                                                                 .DataBound("onDataBound")                                                                                                                                  //.Save("onSave")                                                             //.DataBinding("onDataBinding")                                                             )                                                             .Sortable()                                                             .Scrollable()                                                             .Excel(excel => excel.FileName("export.xlsx").AllPages())                                                             .Filterable()                                                             .DataSource(dataSource => dataSource                                                                 .Ajax()                                                                 .PageSize(20)                                                                 .Events(e =>{                                                                     e.Error("onGridError");                                                                                                                                          //e.RequestEnd("wasSaveSuccessful");                                                                 })                                                             .Model(model => model.Id(p => p.BreedId))                                                             .Create(update => update.Action("EditingPopup_Create", "Breed"))                                                             .Read(read => read.Action("EditingPopup_Read", "Breed"))                                                             .Update(update => update.Action("EditingPopup_Update", "Breed"))                                                             .Destroy(update => update.Action("EditingPopup_Destroy", "Breed"))                                                     ) )@(Html.Kendo().Window().Name("Details")                                             .Title("Details")                                             .Visible(false)                                             .Modal(true)                                             .Draggable(true)                                             .Width(500) )@(Html.Kendo().Notification()                     .Name("notification")                                     .Position(p => p.Pinned(true).Top(30).Right(30))                                      )

Georgi
Telerik team
 answered on 30 Aug 2018
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?