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.
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.
Looking for info on editor templates. Link is broken.
https://docs.telerik.com/aspnet-mvc/helpers/grid/templating/editor-templates
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">
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.
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);
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
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 ?