Telerik Forums
UI for ASP.NET Core Forum
4 answers
570 views

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.

Plamen
Telerik team
 answered on 04 Jan 2019
1 answer
67 views

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.

Tsvetina
Telerik team
 answered on 04 Jan 2019
11 answers
163 views

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?

Tsvetina
Telerik team
 answered on 03 Jan 2019
2 answers
513 views

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

 

James
Top achievements
Rank 1
 answered on 03 Jan 2019
2 answers
626 views
I have the following in a Kendo UI MVC Core Grid to declare that a popup shows when adding or inserting a record:

.Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Template").Window(x => x.Width(500).Height(500)))

That works to bring up the editor template popup which is stored in the Shared/EditorTemplates folder.  And validation is working as well as the Insert or Update methods on the controller are working. 
Yet the when I click the +ADD NEW RECORD button on the Toolbar when the dialog shows it always shows as an update   action. The title bar displays "Edit" and the button displays "Update".  This is happening in another grid as well.  Shouldn't it display "Insert" and "Save" or "Insert" and "Add" when the +ADD NEW RECORD button on the Toolbar is clicked?  Why always "Edit"?

I also need to know if it is in Insert or Edit mode at run-time because I am doing a lookup using Ajax when the user enters a value to check for duplicates on that particular field.

Please advise.
Reid
Top achievements
Rank 2
 answered on 02 Jan 2019
11 answers
996 views
Not sure what I am doing wrong. When I click the update button nothing happens. I do an Inspect and I get a status code:400. Any way to get more details on that error code? I am following the demo and no matter what I do, I get that error.
   @(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"))
)
   )
Viktor Tachev
Telerik team
 answered on 31 Dec 2018
2 answers
147 views

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

Matthew
Top achievements
Rank 1
 answered on 31 Dec 2018
2 answers
1.1K+ views
I need to know how to set the maximum width of the Grid.  I have it inside a DIV with a style setting the width but it extends beyond that and there seems to be nothing that changes that.  I am setting the column widths.
Reid
Top achievements
Rank 2
 answered on 28 Dec 2018
3 answers
1.2K+ views

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.

Dimitar
Telerik team
 answered on 24 Dec 2018
4 answers
835 views

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))

Reid
Top achievements
Rank 2
 answered on 24 Dec 2018
Narrow your results
Selected tags
Tags
+116 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?