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

I'm using the html helpers to configure the scheduler. Little by little, there have been more changes that I wasn't able to do with the html helper.

I've opted to use the edit event of the widget. During the event, the Disclaimer and SystemSoftwareVersion rows are added as well as the scrollbar on the side. Additionally, the Device drop-down is disabled conditionally.

The last thing left to do is to give the labels more space as the line wrapping for System Software Version is undesireable and only gets worse when viewed on mobile.

I know I can:

  • Continue adding on to the edit event and customize there
  • Create a template for the edit window

Both these options aren't ideal as I'd much prefer not messing with the DOM to this extent in the edit event. Since I haven't worked with templates before however, switching over to that option is daunting.

What are my options here? Am I overlooking something? If I wanted to start using templates for the edit window - how do I get started?

Aleksandar
Telerik team
 answered on 08 Dec 2021
1 answer
428 views

Hello,

 

In a .net 5.0 application using MVC, I have a grid that has been defined as Html.Kendo().Grid<dynamic>() because it needs to have dynamically generated columns (a mix between static and dynamic columns).

Html.Kendo().Grid<dynamic>() 
/*..*/
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
.EnableCustomBinding(true)
.Columns(columns =>
{
    for (int i = 0; i < Model.TotalDimensions * 2; i++)
    {
        columns
            .Bound(Model.Data.Columns[i].DataType, Model.Data.Columns[i].ColumnName)
            .Title(Model.Data.Columns[i].Caption)
            .ClientGroupHeaderTemplate($"{Model.Data.Columns[i].Caption} #= value #")
            .Width(100);
    }
}
/*..*/

I am attempting to override the behavior of the filter UI. The documentation states that I should use this syntax:

columns.Bound(/*..*/).Filterable(filter => filter.UI("filterFunction")

Unfortunately, since the grid model has been defined as dynamic, the above line does not compile.

Is there a workaround for this?

Aleksandar
Telerik team
 answered on 06 Dec 2021
1 answer
667 views

Is it possible to integrate loader or other wait component to show that server  side process is running?

 

Tsvetomir
Telerik team
 answered on 06 Dec 2021
1 answer
428 views

Hi All,

May I ask about what will happen if the date over 30 days trial? 

Regards


Mihaela
Telerik team
 answered on 03 Dec 2021
1 answer
231 views

look this:

columns.Bound(p => p.Lock).ClientTemplate("<input onclick='return false;' type='checkbox' #= Lock? checked='checked' : ' ' # />");

It's completely normal but I always get  Invalid template

It's just happen with Hierarchy grid, and with normal grid it works fine.

<script id="LoadWeek" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<WorkingWeek>()
            .Name("grid_#=Id#")
            .Columns(columns =>
            {
                another column bound
                columns.Bound(p => p.Lock).ClientTemplate("<input onclick='return false;' type='checkbox' #= datChuan ? checked='checked' :'' # />");
            })
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(5)
                .Read(read => read.Action("HierarchyBinding_Week", "WeeklyProgress", new { WorkingMonthId = "#=Id#" }))
            )
            .Pageable()
            .Sortable()
            .ToClientTemplate()
    )
</script>
How can I edit the template column as I want with Hierarchy grid?
Alexander
Telerik team
 answered on 03 Dec 2021
1 answer
239 views

Hello,

Is it possible to have a different template per row according to a value of a column in the grid?

Example:

If ForecastType=1

If ForecastType=2

 

If ForecastType=3

 

yellow areas are editable

Tsvetomir
Telerik team
 answered on 02 Dec 2021
1 answer
280 views

I have an asp.net core razor page app im trying to make an edit page I would like to add a Telerik grid to bind to a list of objects that I have declared as a bind property. The Grid is displaying great but when the form posts back I want the grid to modelbind to the list and pass back in the new records, changed records, and delated actions done in the grid.  This is not happening and if I use the bind property or pass the parameter on the onpost I can't get the grid values passed back.

   In the code behind

 

  public class HowToUseSteps

    {

        public int Id { get; set; }

        public string Steptext { get; set; }

    }

 

 

  [BindProperty]

        public  List<HowToUseSteps> _Steps { get; set; }

 

in the cshtml

<form method="post">

              @(Html.Kendo().Grid(Model._Steps)

              .Name("HowToUseSteps")

              .Editable(editable => editable.Mode(GridEditMode.InCell))

              .Columns(columns =>

              {

                  columns.Bound(column => column.Id).Title("Id").Width(100);

                  columns.Bound(column => column.Steptext).Title("Step");

                  columns.Command(command => command.Destroy()).Width(150);

              }

           )

                .ToolBar(toolbar =>

                {

                    toolbar.Create();

                    toolbar.Save();

                })

                    .DataSource(dataSource => dataSource

        .Ajax()

        .PageSize(20)

        .ServerOperation(true)

     )

    <button type="submit" class="btn btn-success">Save</button>

</form>

I know i can call separate on change on delete events on the grid. but i was hoping to use databinding on a postback instead.  any help would be appricated. 

Thanks

Ross

Aleksandar
Telerik team
 answered on 30 Nov 2021
1 answer
124 views

How to display the real value without formating.

Default formating is N2 :

Value : 10.567

Display: 10.56 or 10.57 with round

 

Change formating to N8 :

Value : 10.5678

Display: 10.56780000

 

I would like to display 10.567 or 10.5678 without 0, as in edition.

 

Thx.

Alexander
Telerik team
 answered on 26 Nov 2021
1 answer
113 views

public class RegisterViewModel
    {
        public int Id { set; get; }

        [EmailAddress]
        public string Email { get; set; }

        public string RegObl { set; get; }
        public string RegRaion { set; get; }

        public IFormFile FilesImageUser { get; set; }
    }
 
Register.cshtml

@model exchange.Models.RegisterViewModel @using Kendo.Mvc.UI @Html.AntiForgeryToken() <div class="form-group"><label asp-for="ImageUser">Фото</label> @(Html.Kendo().Upload() .Name("FilesImageUser") .Async(a => a .Save("ImageUserTemp_Save", "File") .Remove("ImageUserTemp_Remove", "File") .AutoUpload(false) ) .Events(e => e .Success("onSuccessImageRegister") //.Select("onSelectImageRegister") ) .ShowFileList(false) .Multiple(false) //.DropZone(".dropZoneElement") .Validation(validation => { validation.AllowedExtensions(new string[] { ".jpg", ".jpeg", ".png", ".bmp"}); }) ) <div class="wrapper"><div id="imageUserRegister"></div></div></div>

 

<button type="submit" class="btn btn-success">Регистрация</button>


 public async Task<ActionResult> Register(RegisterViewModel model)
        {
            if (!ModelState.IsValid) return View(model);
..........
        }

how to make the "upload" data loaded into the model and further processed in the controller. At the moment, the data "null" ?
Alexander
Telerik team
 answered on 26 Nov 2021
1 answer
152 views
Hi,
Tsvetomir
Telerik team
 answered on 25 Nov 2021
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?