Hi,
Using UI for .net core.
I have a requirement to show multi days events in week view,
e.g Start 27/12/18 10:00 AM - End 29/12/18 13:00 PM. (2 days and 3 hours)
So the event should span on those multi days in the week view table part (but not as all day events in the scheduler top row)
The default scheduler week view behavior prevent this by making the event into an all day event.
According to this link :
https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/custom-views/custom-view
I can create a custome view but i cant seem to find an example on how to
create custom view that inherits from week view and that can show events that span for multi days.
I checked out other related forum questions but I cant seem to find an answer, for example:
https://www.telerik.com/forums/show-all-day-event-in-the-main-part-of-week-view
Looking forward for your answers.
Thank you.
Hello,
I'm trying to integrate the sortable component into a grid that is a ClientDetailTemplateId. Is it possible to do that ? Here is my code so far (this grid is the client detail, a grid within a grid)
<script>
@(Html.Kendo().Grid<PointVerificationViewModel>()
.Name("pointGrid_#=Id#")
.Columns(col =>
{
col.Bound(p => p.Libelle);
col.Bound(p => p.EstBloquant)
.ClientTemplate("\\#: data && data.EstBloquant ? 'OUI' : 'NON' \\#");
col.Command(cmd =>
{
cmd.Edit().Text(" ").UpdateText(" ").CancelText(" ").IconClass("fa fa-pencil-alt").UpdateIconClass("fa fa-check").CancelIconClass("fa fa-ban");
cmd.Destroy().Text(" ").IconClass("fa fa-times");
});
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.ToolBar(toolbar =>
{
toolbar.Create().IconClass("fa fa-plus").Text("Créer un point de vérification");
})
.DataSource(ds => ds
.Ajax()
.ServerOperation(false)
.Model(m =>
{
m.Id(p => p.Id);
})
.Read(a => a.Action("Read", "PointVerification", new { familleId = "#=Id#" }).Type(HttpVerbs.Get))
.Create(a => a.Action("Create", "PointVerification", new { familleId = "#=Id#" }).Type(HttpVerbs.Post))
.Update(a => a.Action("Update", "PointVerification").Type(HttpVerbs.Put))
.Destroy(a => a.Action("Delete", "PointVerification").Type(HttpVerbs.Delete))
)
.Sortable()
.ToClientTemplate()
)
@(Html.Kendo().Sortable()
.For("#pointGrid_#=Id#")
.Filter("table > tbody > tr")
.Cursor("move")
.HintHandler("noHint")
.PlaceholderHandler("placeholder")
.ContainerSelector("#pointGrid_#=Id# tbody")
.Events(events => events.Change("onChange"))
)
</script>
i've got an invalide template error with that code.
Thanks a lot.
Hi,
I want to add subtext to my charts. Lets say I have this bar chart with a title legend etc.
This is the main code:
@model Model1
<
div
class
=
"demo-section k-content wide"
>
@(Html.Kendo().Chart<
App.Models.Model2
>()
.title ()
.datasource()
.series()
.catAxis()
.valAxis()
.valaxis()
)
How can I add a span properly with the data from Model2?
Hello,
I'm working with scatter plot.
I'm able to set the color of the series of data points plotted and fill them in.
How do I get the data-point-color in the bottom legend to match the color of the data-points?
Or more simply, how do I set the color of the data-point-color in the x-axis legend?
The cshtml code:
<div class="demo-section k-content wide">
@(Html.Kendo().Chart<Injectsense.Models.ChartScatterPlotPoint>(Model.DataPointList)
.Name("pressureDataChart")
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom))
)
.ChartArea(chartArea => chartArea
.Background("transparent")
)
.SeriesDefaults(seriesDefaults =>
seriesDefaults.Scatter().Labels(labels => labels.Visible(false)).Markers(markers => markers.Size(6))
)
.DataSource(dataSource => dataSource
.Group(group => group.Add(model => model.Name))
)
.Series(series =>
{
series.Scatter(model => model.X, model => model.Y).ColorHandler("getPointColor").Markers(markers => markers.Background("getPointColor"));
})
.XAxis(x => x
.Title(title => title.Text("Date"))
.Date()
)
.YAxis(y => y
.Numeric()
.Title(title => title.Text("Pressure [mmHg]"))
)
.Zoomable()
.Pannable()
)
</div>
The data point:
public class ChartScatterPlotPoint
{
public DateTime X { get; set; }
public double Y { get; set; }
public string Name { get; set; }
public string Color { get; set; }
public ChartScatterPlotPoint(DateTime dateTime, double value, string name, string color)
{
this.X = dateTime;
this.Y = value;
this.Name = name;
this.Color = color;
}
}
The image is attached showing the area of concern.
Thank you for your help on this.
-jim
@(Html.Kendo().Grid(Model)
.Name("Users")
.Columns(columns =>
{
columns.Bound(p => p.LastName);
columns.Bound(p => p.FirstName);
columns.Bound(p => p.ProjectName);
columns.Bound(p => p.ProjectBarcode);
columns.Bound(p => p.DateCreated).ClientTemplate("#= DateCreated? kendo.toString(kendo.parseDate(DateCreated, 'yyyy-MM-ddTHH:mm:ssZ'), 'MM/dd/yyyy'): '' #"); ;
columns.Bound(p => p.Approved);
columns.Command(command => { command.Edit(); }).Width(172);
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Navigatable()
.Sortable()
.Filterable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.Model(model => model.Id(p => p.Id))
.Events(events => events.Error("error_handler"))
.Update(update => update.Action("update", "Account"))
)
)
I need to access a RadComboBox that is defined in one .ascx file from a different .ascx file so that I can get/set values in it. I've read this information https://docs.telerik.com/devtools/aspnet-ajax/general-information/get-client-side-reference#using-jquery-selectors but it isn't working. All help is greatly appreciated. Here are the details about what I have:
In View.ascx the control is specified:
<telerik:RadComboBox RenderMode="Lightweight" ID="cmbReportTool" filter="Contains" runat="server"
oWrap="false" class="cmb-report-tool" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" width="400px">
</telerik:RadComboBox>
and the following JavaScript exists in a different .ascx file:
function () {
var combo = $telerik.$("[id$='cmbReportTool']").get(0).control;
}
I've played around with the JS and used an alert() to quickly see what I have. The following code presents "combo: [object HTMLDivElement]"
function () {
var combo = $telerik.$("[id$='cmbReportTool']").get(0);
alert('combo: ' + combo);
}
The following code presents "combo: undefined"
function () {
var combo = $telerik.$("[id$='cmbReportTool']").get(0).control;
alert('combo: ' + combo);
}
Here are some specifics about my environment:
OS: Windows 7 Enterprise with service pack 1
Browser: Internet Explorer 11
Telerik Web UI version 2016.3.1027.40
Decorating a string field on a view model with [DataType(DataType.MultilineText)] and [Required] and then creating an @Html.Kendo().EditorFor(x => x.Field) does not add the "data-val-required" validation attribute to the Kendo Editor's underlying textarea element. In fact, no DataAnnotation attribute, nor custom validation attributes that implement ValidationAttribute and IClientModelValidator get handled properly for the Kendo Editor. From what I've seen, other controls seem to handle them just fine.
Do you have any plans on adding validation support for the Kendo Editor? We've been working around this by manually adding the html attributes to the controls, but this really isn't desirable as it adds a higher maintenance cost to our application.
I have many, many grids in the ASP.NET Core application but there is one template where the column resizing is not working. So the resize icon shows up when you hover but moving it left or right does nothing. And the hard coded column widths if I change the values have no effect.
.Resizable(resize => resize.Columns(true))