Telerik Forums
UI for ASP.NET MVC Forum
4 answers
152 views

I'm having a VERY odd problem.

I have an application with a number of date/time pickers. When running the application locally, all date times are displayed correctly, and stored correctly in the database.

When the application is published to Azure, there's an issue. For example, if a user adds a record with a date of 8/1/2019, then saves / refreshes. The record is displayed with a date of 7/31/2019 (date minus 1). In this scenario, the correct date is still being stored in the database.

It's seems likely that something is amiss with Azure (since there are no issues when running locally) but I'm not sure where I should be looking. I checked the obvious stuff (time zones, etc) but couldn't find anything that accounts for this odd behavior.

Has anyone experienced this issue before? Any feedback would be much appreciated.

Georgi
Telerik team
 answered on 22 Aug 2019
3 answers
102 views
When a blank Kendo Editor loses focus, the only way to regain focus is to click in the upper left corner right about where the cursor would be located by default. This issue doesn't seem to occur in Firefox.

It can be recreated on the demo page (at least in the version of Chrome I'm currently using, Version 75.0.3770.100): https://demos.telerik.com/aspnet-mvc/editor

1. Highlight the existing text and clear all of it.

2. Click outside the Editor.

3. Click inside the Editor anywhere other than the upper left corner. The editor does not regain focus.

Is there a potential workaround for this issue?
Kevin
Top achievements
Rank 1
 answered on 21 Aug 2019
3 answers
2.5K+ views

Is any way to access kendo controls in EditorTemplate?

If I have

@Html.Kendo().DropDownList().Name("Name1").HtmlAttributes(new { style = "width:100%;" })

int EditorTemplate

In Edit event of grid or inside EditorTemplate attempt to access kendo controls returns undefined value like

$("#Name1").data("kendoDropDownList") is undefined.

 

It undefined in edit event, it undefined anywhere I believe due to control is not being initialized yet.

Viktor Tachev
Telerik team
 answered on 21 Aug 2019
1 answer
102 views

Looking for info on editor templates. Link is broken.

    https://docs.telerik.com/aspnet-mvc/helpers/grid/templating/editor-templates

 

 

 

Nikolay
Telerik team
 answered on 20 Aug 2019
2 answers
431 views

Hello,

I'm trying to use autocomplete in a Batch Editing Grid.  After selecting a value from the autocomplete list when I leave the field the old value stay in the text zone.  See attachment to understand better.

This is my view.

@(Html.Kendo().Grid<SafetyStudioWeb.Areas.Maintenance.ViewModels.Equipe.EquipemModell>()
            .Name("Equipement")
            .Columns(columns =>
            {
                columns.Bound(p => p.DateIntervention).Format("{0:yyyy-MM-dd}").Width(70).HtmlAttributes(new { style = "text-align:center" });
                columns.Bound(p => p.NombreHeuresUtilisationIntervention).Width(50).HtmlAttributes(new { style = "text-align:center" });
                columns.Bound(p => p.ResponsableEntretienIntervention).Width(80).EditorTemplateName("AutoCompleteResponsableEntretienIntervention");
                columns.Command(command => { command.Destroy(); }).HtmlAttributes(new { style = "text-align:center" }).Width(95);
            })
            .ToolBar(toolBar =>
            {
                toolBar.Create();
                toolBar.Save();
            })
            .Editable(editable => editable.Mode(GridEditMode.InCell))
            .HtmlAttributes(new { style = "font-size:11px;height: 300px;" })
            .Scrollable()
            .Selectable(s => s.Enabled(false))
            .Pageable(pageable => pageable
            .Refresh(true)
            .ButtonCount(5))
 
            .DataSource(dataSource => dataSource
                .Ajax()
                .Batch(true)
                .ServerOperation(false)
                .PageSize(100)
                .Model(model =>
                {
                    model.Field(field => field.DateIntervention).DefaultValue(System.DateTime.Now);
                })
                .Sort(a => a.Add("DateIntervention").Descending()).Sort(a => a.Add("NombreHeuresUtilisationIntervention").Descending())
                .Read(read => read.Action("SommaireEquipementIntervention", "Equipements", new { Id = Model.EquipementId }))
                .Create(create => create.Action("CreateEquipementIntervention", "Equipements", new { Id = Model.EquipementId }))
                .Update(update => update.Action("UpdateEquipementIntervention", "Equipements"))
                .Destroy(destroy => destroy.Action("DestroyEquipementIntervention", "Equipements"))
            )
)

 

And the EditorTemplate :

@model string
 
@(Html.Kendo().AutoComplete()
          .Name("ResponsableEntretienIntervention")
          .Filter(FilterType.StartsWith)
          .MinLength(0)
          .HtmlAttributes(new { style = "width:100%" })
          .DataSource(source =>
          {
              source.Read(read =>
              {
                  read.Action("ObtenirResponsable", "Equipements", new { area = "Maintenance" })
                       .Data("onAdditionalDataResponsableEntretienIntervention");
              })
              .ServerFiltering(true);
          })
)

I try with @(Html.Kendo().AutoCompleteFor(m => m)…  but it's worst.  Everything diseapear.

 

I think I see with Developers Tools is the ID and Name of the control change for this (the name get _ and repeat) :

 

<input id="ResponsableEntretienIntervention_ResponsableEntretienIntervention" name="ResponsableEntretienIntervention.ResponsableEntretienIntervention" style="" type="text" value="" data-role="autocomplete" class="k-input" autocomplete="off" role="textbox" aria-haspopup="true" aria-disabled="false" aria-readonly="false" aria-owns="ResponsableEntretienIntervention_ResponsableEntretienIntervention_listbox" aria-autocomplete="list" data-bind="value:ResponsableEntretienIntervention.ResponsableEntretienIntervention">

 

 

 

Louis
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 20 Aug 2019
5 answers
1.0K+ views

For our application, we were using Kendo Grid with a class named Properties that stored column information:

public class Properties
{
   
public string Id { get; set; }
public object PROPERTY_0 { get; set; }
public object PROPERTY_1 { get; set; }
...
public object PROPERTY_43 { get; set; }

In order to sort and filter rows, we used the ToDataSourceResult extension. However, this system limited us to a hardcoded maximum number of columns. We have refactored the code to use a List<Dictionary<string, dynamic>> instead, which allows us to store results in key value pairs in a list thus allowing an arbitrary maximum number of columns.

Unfortunately, I have not been able to find any documentation on whether ToDataSourceResult is able to parse data in this format, or any format aside from the previous one. While it is possible to recreate the logic for filtering, grouping, and sorting, it would take a good deal of time to do so. Is there any way to use ToDataSourceResult instead? We are storing values in a dictionary with PROPERTY_x as a string key and a dynamic value.

Boyan Dimitrov
Telerik team
 answered on 19 Aug 2019
7 answers
409 views
I am currently using a multiselect for, which populates the list by means of a datasource.

The problem is that when typing in the input is not taking empty spaces, even when typing the multiselect space bar does not take them, why could this happen?
Ivan Danchev
Telerik team
 answered on 19 Aug 2019
9 answers
2.7K+ views
Hello,

I want to filter a Grid with Bound bool field by using a dropdown instead of normal radiobuttons.
Is this possible at all?

I have tried settings filterable.UI as follows:

columns.Bound(c => c.UnServiceable)
    .Title("U/S")
    .ClientTemplate("#if(UnServiceable) { #Yes# } else { #No# }#")
    .Filterable(filter => filter
        .Messages(m => m.Info(Strings.Filter_UnServiceable_Message))
        .UI("boolAsDropdown"))
    .Width(100);


However, the â€‹boolAsDropdown​ javascript function is never called. It seems to be unable to call this when using a boolean field as data column.
The same method is working fine with other column types (int, string).

If anyone could help me with this issue, this would be great.

Thank you in advance,
Nick
Alex Hajigeorgieva
Telerik team
 answered on 19 Aug 2019
1 answer
127 views

Hi, 

I have several questions regarding the management of locked columns.

 

1) Auto-size

Is there a way for unlocked columns to automatically calculate their size so that they fill the "free" part of the grid, as when there are no fixed columns?

The appearance of the horizontal scroller when displaying or hiding columns is simply illogical compared to the basic grid

I'm not talking about autofit, who make 'empty part' or display scroller 

 

2) Size in pixel

In asp.net mvc, we can give the size of the columns in em, vw, %, ...

This works for basic grids, but not when there are fixed columns.

Is it normal or is there a lack?

 

3)  All locked columns

Is there a way to have a basic grid but without the user changing the order of the columns

 

Regards

Viktor Tachev
Telerik team
 answered on 19 Aug 2019
12 answers
205 views

Is it possible to show AllDay-events in the time area, that means as a block from 0-24?

Is it possible to show an event which is ranging from 2016-09-13 8AM to 2016-09-14 9PM not in the all day-row but in the times area than as big block ?

Ivan Danchev
Telerik team
 answered on 15 Aug 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?