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

Is there a way to size the toolbar?  I am using the MVC server side declaration.

 

Thanks

Ivan Danchev
Telerik team
 answered on 30 Mar 2018
1 answer
125 views

HI,

 

The filtering options show for each column, but when "Filter" is clicked nothing changes in the grid.

 

@(Html.Kendo().Grid<FlRazor2.Models.Header>()
                                .Name("grid")
                                .Columns(columns =>
                                {
                                    columns.Bound(p => p.id).Title("Case ID");
                                    columns.Bound(p => p.individual.firstName).ClientTemplate("#=individual? individual.firstName:''#").Title("First Name");
                                    columns.Bound(p => p.individual.lastName).ClientTemplate("#=individual? individual.lastName:''#").Title("Last Name");
                                            //columns.Command(command => { command.Edit(); command.Destroy(); }).Width(250);
                                        })
                                .ToolBar(tools =>
                                {
                                            //tools.Create();
                                        })
                                .Sortable()
                                .Pageable()
                                //.Filterable()
                                .Filterable(filterable => filterable
                                    .Extra(false)
                                        .Operators(operators => operators
                                        .ForString(str => str.Clear()
                                        .Contains("Contains")
                                        .IsEqualTo("Exactly matches")
                                        .StartsWith("Starts with"))))
                                .DataSource(dataSource =>
                                dataSource
                                .WebApi()
                                .Model(model =>
                                {
                                    model.Id(p => p.id);
                                })
                                .Events(events => events.Error("error_handler"))
                                .Read(read => read.Action("Get", "Home"))
                                //.Create(create => create.Action("Post", "Product"))
                                //.Update(update => update.Action("Put", "Product", new { id = "{0}" }))
                                //.Destroy(destroy => destroy.Action("DELETE", "Product", new { id = "{0}" }))
                                )
                    )

 

from controller:

[HttpGet]
        public DataSourceResult Get([DataSourceRequest]DataSourceRequest request, string t)
        {
            string userName = User.Identity.Name;
            int indexOfSlash = userName.IndexOf("\\");
            userName = userName.Substring(indexOfSlash + 1).ToLower();

            //DataSourceResult test = service.Read().ToDataSourceResult(request);
            //return service.Read().ToDataSourceResult(request);
            IEnumerable<Header> headers = _service.Read();
            DataSourceResult result = new DataSourceResult();
            result.Data = headers;
            result.Total = headers.Count();
            return result;
        }

 

 

Viktor Tachev
Telerik team
 answered on 28 Mar 2018
4 answers
360 views

Hello,

I've got some problems with add template to PanelBar. I've just tried simple code bellow ... but it doesn't work (and no error raised)

Could you help me?

@{
        List<PanelBarItemModel> panelBarList = new List<PanelBarItemModel>();
        panelBarList.Add(new PanelBarItemModel() { Id = "1", Text = "val1" });
        panelBarList.Add(new PanelBarItemModel() { Id = "2", Text = "val2" });
 
    }
 
    <script id="panelbar-template" type="text/kendo-ui-template">
        #: item.Id # - #: item.text #
    </script>
 
    @(Html.Kendo().PanelBar()
            .Name("TestPanelBar")
            .TemplateId("panelbar-template")
            .ExpandMode(PanelBarExpandMode.Multiple)
            .BindTo(panelBarList)
    )
Dimitar
Telerik team
 answered on 27 Mar 2018
3 answers
201 views

Hello,

I have a toolbar with a Split Button and many entries which are not all visible because the height of the screen is not big enough...
How to have a scrolling of the splitbutton dropdown list if the screen is to small i.e. there a more items to display depeneding on the screen size (I don't want to have a fix height)

see attached picture

Magdalena
Telerik team
 answered on 27 Mar 2018
1 answer
111 views
HI, this is for the list of columns on the left side of the Gantt, called TreeListView. If it would be possible to add additional columns that we select or implement during data binding, for example: Duration, other dates, description that the client will select dynamically, so they must not be a static list of columns.

Thank you,
-AMR
Veselin Tsvetanov
Telerik team
 answered on 27 Mar 2018
1 answer
278 views

Hi,

 My grid is configured as follows:

@(Html.Kendo().Grid<GRL.DomainViewModel.ViewModel>()
                                .Name("tblView")
                                .Columns(columns =>
                                {
                                    columns.Bound(p => p.Selected).Width(50).Title(" ").ClientTemplate("<input id='recApprovalsSelected' style = 'width: 30px' type='checkbox' #= Selected ? checked='checked' :'' #' onclick='recApprovalViewRowCheck(this)' />");
                                    ....
                                    columns.Command(command => command.Custom("approverViewCoversheet").Text("Coversheet").Click("recApprovalsViewCoversheetClick")).Width(100).Title(" ");
                                    columns.Command(command => command.Custom("approverViewReconcilerComment").Text("Comment").Click("recApprovalsViewCommentClick")).Width(100).Title(" ");
                                })
                                 .Scrollable(s => s.Height(550))
                                 .Pageable(pageable => pageable.Refresh(true)
                                                            .Input(true)
                                                            .PageSizes(new int[] { 100, 250, 500, 1000 }))
                                .Sortable()
                                .NoRecords()
                                .AutoBind(false)
                                .Reorderable(r => r.Columns(true))
                                .Resizable(resize => resize.Columns(true))
                                .Filterable()                                
                                .Groupable(true)                               
                                .ClientDetailTemplateId("approverViewPackageDetails")
                                .DataSource(dataSource => dataSource
                                    .WebApi()
                                    .Batch(true)
                                    .Model(model =>
                                    {
                                        model.Id(p => p.PkgName);                                        

                                    })
                                    .PageSize(100)
                                    .ServerOperation(false)
                                    .Read(read => read.Action("View", "Manager").Data("ViewParameters"))
                                )
                            )
                            <script id="approverViewPackageDetails" type="text/kendo-tmpl">
                                <h4>Details for Package \\##=PkgName# </h4>
                                @(Html.Kendo().Grid<GRL.DomainViewModel.GLComboViewModel>()
      .Name("grid_#=PkgId#")
      .Columns(columns =>
      {
          columns.Bound(p => p.Account).Title("Account").Width(75);
          .....
          columns.Bound(p => p.TransCur).Title("Trans.Cur").Width(80);
          columns.Bound(p => p.TransAmount).Title("Trans.Amount").Width(100);          
          columns.Bound(p => p.RecAmount).Title("Rec.Amount").Width(100);
      })      
      .Pageable()
      .Sortable()
      .NoRecords()
       .Reorderable(r => r.Columns(true))
      .Resizable(resize => resize.Columns(true))
      .Filterable()
      .DataSource(dataSource => dataSource
            .WebApi()
            .Model(model =>
            {
                model.Id(p => p.RecPackageId);
            })
            .PageSize(15)
            .Read(read => read.Action("RecPackageCombo", "RecPackageManager", new
            {
                PkgId = "#=PkgId#",
                pkgVer = "#=PkgVersion#"             
            }))
      )
      .ToClientTemplate()
                                )

For my Child Grid, if TransAmount is not equal to RecAmount, i need the row be highlighted in different color. 

I tried using the ClientRowTemplate on child grid also tried adding ClientTemplate on the Child grid columns, but it did not work.

Thanks,

 

 

 

Stefan
Telerik team
 answered on 27 Mar 2018
2 answers
247 views

How to set DataTextField of ListBox dynamically

I have a listbox control as

@(Html.Kendo().ListBox()
        .Name("ListboxCompany")
        .Selectable(ListBoxSelectable.Single)
            .DataTextField("name")
            .DataValueField("Id")                       
            )
            .BindTo(Model)       
        )

 

and

created a radiobuttongroup.  So how I can change DataTextField with the value checked from radiobuttongroup

 

Antony
Top achievements
Rank 1
 answered on 26 Mar 2018
1 answer
215 views

Is there any plans to port the File Explorer control in the asp ajax suite to Asp.Net Core?

Thanks,

Richard

Dimitar
Telerik team
 answered on 26 Mar 2018
3 answers
556 views

Hi,

how to setup margin element for PDF export using tag helpers? 

<pdf 
                    all-pages="true" 
                    avoid-links="true"
                    landscape="true"
                    repeat-headers="true"
                    paper-size="A4"
                    scale="1"
                    template-id="pdf-export-template" 
                    file-name="Example.pdf" 
                    proxy-url="PdfExport"
                    margin="????"/>

Kind regards,
Asmir

Viktor Tachev
Telerik team
 answered on 23 Mar 2018
2 answers
665 views

I have a grid showing data and the Edit brings up a wrapper editor for that type in the shared folder.  Which is done automatically if the template name matches the class name.

The problem is that the update button does not fire the controller action

 

public async Task<ActionResult> Distributors_Update([DataSourceRequest]DataSourceRequest request,
[Bind(Prefix = "models")] IEnumerable<Distributor> distributors)

 

The Read action is working and again the custom type template is being used but no update action firing.

 

Any help would be appreciated.

Stefan
Telerik team
 answered on 23 Mar 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?