Telerik Forums
UI for ASP.NET Core Forum
1 answer
130 views
I'm trying to replicate the example "https://demos.telerik.com/aspnet-mvc/tilelayout/reordering" on my PC.

I have copied the images in appropriate location.

I copy and past the code from the example code, but i don't see anything. Why?

Thanks 

Fabio
Eyup
Telerik team
 answered on 31 Aug 2020
2 answers
148 views

I am using your PDF Viewer and Document processing to merge PDF files together.  Now, my requirement is to merge multiple PNG files together.  Do you have a control that will do this?  If not, any idea how I would go about this?  

As a side thought, maybe I could meet the requirement by adding the 2 PNG files into a PDF file; one after another.  Do you have an example on how to do this?

Thanks in advance for your help,

Joel

Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 28 Aug 2020
1 answer
2.0K+ views

Hey,

 

I am using kendo grid incell edit mode in my project

I want to convert the alphabets to upper case(in caps) as the users enter in the cells. As he types in the letters should automatically change in CAPS - from a to A  

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 28 Aug 2020
1 answer
2.2K+ views

Hi

I want to make the column title of kendo grid as BOLD font

please help 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 28 Aug 2020
4 answers
262 views

     Hi, does anyone have any code samples for a .Net Core scheduler that can accept a drag and drop from another control, such as a Grid?   I am upgrading an old ASP.NET app that has this same functionality using Telerik scheduler and need to keep this heavily used feature intact.   I have seen the Jquery example of this however that does not translate well into the .net Core scheduler.   

Thanks for any help

Regards

Ivan Danchev
Telerik team
 answered on 26 Aug 2020
11 answers
456 views

 

Hi,

we use some grids where we have defined the filters that appear on the columns with:

.Filterable(ftb => ftb.Mode(GridFilterMode.Row)
                .Extra(true)
                .Operators(operators => operators
                    .ForString(str => str.Clear()
                        .Contains(String.Format(SharedLocalizer["lblGridFilterContains"].Value))
                        .StartsWith(String.Format(SharedLocalizer["lblGridFilterBeginsWith"].Value))
                        .IsEqualTo(String.Format(SharedLocalizer["lblGridFilterIsEqual"].Value)))
                    .ForNumber(num => num.Clear()
                        .IsEqualTo(String.Format(SharedLocalizer["lblGridFilterIsEqual"].Value))
                        .IsGreaterThan(String.Format(SharedLocalizer["lblGridFilterGreaterThan"].Value))
                        .IsLessThan(String.Format(SharedLocalizer["lblGridFilterLessThan"].Value))
                        )
                    .ForDate(date => date.Clear()
                        .IsEqualTo(String.Format(SharedLocalizer["lblGridFilterIsEqual"].Value))
                        .IsGreaterThan(String.Format(SharedLocalizer["lblGridFilterGreaterThan"].Value))
                        .IsLessThan(String.Format(SharedLocalizer["lblGridFilterLessThan"].Value))
                        )
                    )
            )

 

And it works great.

The problem is that when there are grouped columns it works in the "normal" columns but not in the grouped ones (it shows all the filters and not the ones we've defined).

The only way we have found to make it work in every column is to define again in the column that's grouped the filterable operator:

c.Group(group => group
            .Title(@SharedLocalizer["lblPaymentdiscountday2"].Value)
            .HeaderHtmlAttributes(new { groupname = "paymentsGrid_grp_skonto2" })            
            .Columns(skonto2 =>
            {
                skonto2.Bound(m => m.discountday_2).HtmlAttributes(new { style = "text-align: right;" }).Width(90)
                .Filterable(f => f
                    .Cell(cell => cell.Enabled(true).MinLength(100))
                    .Operators(op => op
                            .ForNumber(num => num.Clear()
                                    .IsEqualTo(String.Format(SharedLocalizer["lblGridFilterIsEqual"].Value))
                                    .IsGreaterThan(String.Format(SharedLocalizer["lblGridFilterGreaterThan"].Value))
                                    .IsLessThan(String.Format(SharedLocalizer["lblGridFilterLessThan"].Value))
                                    ))
                    );                
                skonto2.Bound(m => m.discount_2).HtmlAttributes(new { style = "text-align: right;" }).Format(@SharedLocalizer["gridColumnFormatDec"].Value).Width(100).Filterable(f => f.Cell(cell => cell.Enabled(true).MinLength(100)));
                skonto2.Bound(m => m.netday).HtmlAttributes(new { style = "text-align: right;" }).Width(90).Filterable(f => f.Cell(cell => cell.Enabled(true).MinLength(100)));

            })
        );

 

We'd like to know if there's another way to make the custom filters work in grouped columns, because we'd like to avoid writing the same code for every grouped column in the grid.

Thank you in advance.

Kind regards

Nikolay
Telerik team
 answered on 26 Aug 2020
1 answer
293 views

I am new to ASP.Core. How do I get the selected items from the "selected" ListBox on the OnPost event?

 

  @(Html.Kendo().ListBox()
        .Name("optional")
        .Toolbar(toolbar =>
        {
            toolbar.Position(ListBoxToolbarPosition.Right);
            toolbar.Tools(tools => tools
                .MoveUp()
                .MoveDown()
                .TransferTo()
                .TransferFrom()
                .TransferAllTo()
                .TransferAllFrom()
                .Remove()
            );
        })
        .ConnectWith("selected")
        .DataTextField("PlayerId")
        .DataTextField("Name")
        .Draggable(true)
        .DataSource(ds => ds.Ajax()
        .Read(r => r.Url("/League/PreDraftPage?handler=Read").Data("forgeryToken"))
)
    )
        @(Html.Kendo().ListBox()
        .Name("selected")
              .Toolbar(toolbar =>
        {
            toolbar.Position(ListBoxToolbarPosition.Right);
            toolbar.Tools(tools => tools
                .MoveUp()
                .MoveDown()
          );
        })
        .DataTextField("PlayerId")
        .DataTextField("Name")
        .BindTo(Model.LeaguePreDraftList)
        .Selectable(ListBoxSelectable.Multiple)
public void OnPost()
   {
       Guid leagueId;
       List<LeaguePreDraftViewModel> listModel;
 
 
       if (ModelState.IsValid)//save the data
       {
           var name = Request.Form["selected"];
           listModel = LeaguePreDraftList;
       }
       //leagueId = new Guid(id);
       //get data from page
 
   }
    )
Nikolay
Telerik team
 answered on 25 Aug 2020
1 answer
1.8K+ views
I have a model which looks like this
public class NotificationModel
    {
        public List<TableNotificationModel> TableNotificationModel { get; set; }
        public List<WrongTableNotificationModel> WrongTableNotificationModel { get; set; }
    }

 

and I have a view with two different Kendo grids. I want to populate the first Kendo grid with the TableNotificationModel and the second grid with the WrongTableNotificationModel

@model ModelLayer.Models.NotificationModel
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
@{ ViewData["Title"] = "Index"; }
 
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"></script>
<script>
    window.rootUrl = '@Url.Content("~/")';
</script>
<h1>Upload index</h1>
 
 
<div>
    <h4>Upload file</h4>
    <form asp-controller="Upload" asp-action="Upload"
          enctype="multipart/form-data" method="post">
        <input type="file" name="file" />
        <button type="submit" id="btn">Upload</button>
    </form>
 
    @if (ViewBag.Message != null)
    {
<script>
        $(document).ready(function(){
            alert('@Html.Raw(ViewBag.Message)');
        });
</script>}
 
 
</div>
 
 
<div class="clearfix">
    @(Html.Kendo().Grid<Model.WrongTableNotificationModel>()
        .Name("successfullData")
        .ToolBar(tools => tools.Excel())
        .Pageable(pageable => pageable.Input(true).Numeric(false))
        .Scrollable()
        .Sortable()
        .Filterable()
        .ColumnMenu()
        .Groupable()
        .Columns(columns =>
        {
            columns.Bound(c => c.OPERATOR_OBJECTID).Title("ID").Hidden();
            columns.Bound(c => c.SETTLEMENT_OBJECTID).Title("settlement code").Width("100px");
            columns.Bound(c => c.TECHNOLOGY_OBJECTID).Title("tech code").Width("100px");
            columns.Bound(c => c.UPLOAD_SPEED_CLASS_OBJECTID).Title("upload").Width("100px");
            columns.Bound(c => c.DOWNLOAD_SPEED_CLASS_OBJECTID).Title("download").Width("100px");
            columns.Bound(c => c.DATA_CATEGORY_QOS_OBJECTID).Title("data category").Width("100px");
            columns.Bound(c => c.SHAPE).Title("shape").Width("100px");
            columns.Bound(c => c.messageOut).Title("message").Width("100px");
        })
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Read(read => read.Action("Upload_Read", "Upload").Data("sendAdditional"))
            )
    )
 
</div>
 
<div class="clearfix">
    @(Html.Kendo().Grid(Model.TableNotificationModel)
        .Name("unsuccessfullData")
        .ToolBar(tools => tools.Excel())
        .Pageable(pageable => pageable.Input(true).Numeric(false))
        .Scrollable()
        .Sortable()
        .Filterable()
        .ColumnMenu()
        .Groupable()
        .Excel(excel => excel
            .FileName("file.xlsx")
            .Filterable(true)
            .ProxyURL(Url.Action("Excel_Export_Save", "Upload"))
              )
        .Columns(columns =>
        {
            columns.Bound(c => c.OPERATOR_OBJECTID).Title("ID").Hidden();
            columns.Bound(c => c.SETTLEMENT_OBJECTID).Title("settlement code").Width("100px");
            columns.Bound(c => c.TECHNOLOGY_OBJECTID).Title("tech code").Width("100px");
            columns.Bound(c => c.UPLOAD_SPEED_CLASS_OBJECTID).Title("upload").Width("100px");
            columns.Bound(c => c.DOWNLOAD_SPEED_CLASS_OBJECTID).Title("download").Width("100px");
            columns.Bound(c => c.DATA_CATEGORY_QOS_OBJECTID).Title("data category").Width("100px");
            columns.Bound(c => c.SHAPE).Title("shape").Width("100px");
            columns.Bound(c => c.messageOut).Title("message").Width("100px");
        })
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Read(read => read.Action("Upload_Read", "Upload").Data("sendAdditional"))
            )
    )
 
</div>
 
<script>
    function sendAdditional() {
        var data = JSON.parse('@Html.Raw(Json.Serialize(Model))');
 
        return {
            model: data
        }
    }
</script>

neither of these methods I tried work

@(Html.Kendo().Grid(Model.TableNotificationModel)
        .Name("successfullData")
 
@(Html.Kendo().Grid<Model.WrongTableNotificationModel>()
        .Name("unSuccessfullData")

 

Is there a way to do this? Can I show both table with different models in the same view?

Eyup
Telerik team
 answered on 24 Aug 2020
3 answers
2.3K+ views

Hey,

I am trying to choose a different template for a popup editor depending on whether a new entry is inserted or an already existing one is modified. I am aware that I probably have to subscribe to the "beforeEdit" event of the grid and act depending on whether e.model.isNew() returns true or false.

However, I was not able to set a different template based on this decision yet. Could you please outline what the cleanest way for doing this would be?

So far my code looks similar to this:

@(Html.Kendo().Grid<Data.Promotion>()
    .Name("promotionGrid")
    .Columns(c =>
    {
        ...
        c.Command(cmd => cmd.Edit()).Width(120);
        c.Command(cmd => cmd.Destroy()).Width(120);
    })
    .Events(e =>
    {
        e.BeforeEdit("beforeEdit");
        e.Edit("edit");
    })
    .DataSource(c =>
    {
        c.Ajax()
        .Read(o => o.Url("CodeManagement?handler=Read").Data("forgeryToken"))
        ...
        .Model(m =>
        {
            m.Id("PromotionId");
            ...
        });
    })
    .ToolBar(c =>
    {
        c.Create();
    })
    .Editable(c =>
    {
        c.Mode(GridEditMode.PopUp);
        c.TemplateName("Promotion");  // using a static template right now, we want to change that
    })
)

 

Moreover, in the Edit-template, I have to constrain a DatePicker based on some model properties. However, the Model field is not set which leads to a NullReferenceException. Is there any way to set the Model field of the template to the entry that is currently being edited/created?

Thank you.

Neli
Telerik team
 answered on 21 Aug 2020
1 answer
1.7K+ views
How do I get a copy of Kendo.mvc.dll for  Progress® Telerik® UI for ASP.NET Core Version 2020.2.617?  
Dimitar
Telerik team
 answered on 21 Aug 2020
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?