Telerik Forums
UI for ASP.NET MVC Forum
1 answer
165 views
I have been able to successfully build an integrate a Custom Editor Template for the events in the scheduler. However, There are certain fields in the Model being edited that I only want to display- the user should not be able to edit the values. I also want to include a button inside of the Custom Editor that links to another area of the web app based off of one of these readonly Model properties. However, I have been having issues getting these readonly properties to properly bind to the view... I have tried Html.DisplayFor, and this is not binding correctly. How can I properly bind and access the values for Model properties inside of a Custom Editor while keeping the values read-only?
Vladimir Iliev
Telerik team
 answered on 08 Jul 2015
2 answers
100 views

I have a scheduler setup with filters. I have ServerOperation(false) so that my filters can be changed without doing a reload. Lastly, I have the read defined like Read(read => read.Action("Read", "Home").Data("getDateRanges")). The getDateRanges function returns an object with start and end dates.

 When my page loads, all works fine. I can turn on and off filters and watch appointments come and go. No network requests are made for this. When I move from a week view to a day view and back to a week view no network requests happen. All is well. Now, I change weeks, or move to a monthly view. I can only see appointments already loaded. This should have triggered a new Read event but does not.

What can I do to fix this? If I turn ServerOperation to true, then it reloads always even when changing from a week to a day mode.

Georgi Krustev
Telerik team
 answered on 08 Jul 2015
2 answers
87 views

Hi,

I try to use this tree list; i need to expand a complete parent-multiple children in the tree. So:

- child deep in the hierarchy is known to my code and can be found in the tree list

- via code, the complete tree needs to be expanded to expand the child itself and all its parents

The demos only seem to work programmatically expanding nodes which are already displayed, but in this case the child nodes can be hidden. Is there a way to do this? Thanks in advance!

Best regards,

Ruud

Ruud
Top achievements
Rank 1
 answered on 08 Jul 2015
2 answers
942 views

I am trying to add percentages as labels to my Kendo bar chart - I have got this working for Pie Charts fine but the same code isn't working for bar charts.  For the pie charts I use the .Template property of the label, and the "percentage" property is inherently available (I've not defined it in my model I'm binding to anywhere). This is what I am using for the series for my pie chart (working) :-

 .Series(series => series
        .Pie(model => model.Share, model => model.SiteSurveyed.ToString(), model => model.Color)
        .Padding(0)
        .Labels(labels => labels
            .Visible(true)
            .Template("#= category # - #= value # (#= kendo.format('{0:P}', percentage)#)")
            .Align(ChartPieLabelsAlign.Column)
            .Position(ChartPieLabelsPosition.Center)
        )
    )

And this is what I am using for my bar charts (not working - the UI just puts undefined in the label) :-

   .Series(series => series
        .Bar(d => d.Share, d => d.Color)
        .Labels(labels => labels
            .Visible(true)
            .Template("#= value # (#= kendo.format('{0:P}', percentage)#)")
            .Position(ChartBarLabelsPosition.Center)
        )
    )

Please can you advise how I can make this work.

Thanks, Mark

Mark
Top achievements
Rank 1
 answered on 08 Jul 2015
8 answers
390 views
Hi. I'm looking for an example in Razor like the Grid Toolbar demo found here: http://demos.kendoui.com/web/grid/toolbar-template.html. I've put together the basics and it is working but a more complete example would be great. The docs found here: http://docs.kendoui.com/api/web/grid#toolbar-array also do not provide help in getting the Razor syntax correct.
Vladimir Iliev
Telerik team
 answered on 08 Jul 2015
1 answer
272 views

Hello,

i run into a problem about conditional binding properties. I want certain properties only writeable on creating an entity, but not on editing. Generally i can fix it on server side by just adding code to check it or just not bind some properties. But how i can solve this on client side? Let's take the following example:

Data model ->

public classs MyDataModel
{
    [ScaffoldColumn(false)]
    public long Id { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [StringLength(255)]
    [DisplayName("Title")]
    public string Title { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [StringLength(255)]
    [DisplayName("Description")]
    public string Description { get; set; }
 
    [Required(AllowEmptyStrings = false)]
    [DisplayName("Type")]
    [DefaultValue(1)]
    public int TypeOfSomething { get; set; }
}

 

So "TypeOfSomething" should be only writeable on creating the entity. On later editing it should be read only. There is an interesting approach in this comment http://www.codethinked.com/aspnet-mvc-think-before-you-bind/comment-page-1#comment-3933, but i don't see any way to realize this with the Telerik Grid.
Maybe one of you guys have an idea or some hints for achieving this on client side with the Telerik Grid.

 thanks & regards

Alexander Popov
Telerik team
 answered on 08 Jul 2015
1 answer
156 views

Hi,

Is it possible that Kendo UI to detect Microsoft Edge browser? It seem like currently it is detect as Webkit.

Sample of Microsoft Edge user agent string from https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx:

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0

Thanks.

Kiril Nikolov
Telerik team
 answered on 08 Jul 2015
1 answer
132 views

Hi,

Is it scrollable tab must set the width to tabstrip and cannot auto detect? How to make it work as responsive, automatically scroll when browser width smaller than tabstrip width and hide when exceed tabstrip width.

 

Thanks.

Dimo
Telerik team
 answered on 07 Jul 2015
3 answers
227 views

Hello

    Perhaps telerik diagrams are quite good, but I can't find out how to reload a diagram?

I have a diagram like this:

 

@(Html.Kendo().Diagram()
              .Name("diagram")
              .DataSource(dataSource => dataSource
              .Read(read => read
                          .Action("GetLinkedPersonsData", "KartotekaKlientow")
              )
              .Model(m => m.Children("Items"))
              )
              .Editable(false)
              .Layout(l => l.Type(DiagramLayoutType.Layered))
              .ShapeDefaults(sd => sd
                      .Visual("LinkedPersonsTemplate")
              )
              .ConnectionDefaults(cd => cd
              .Stroke(s => s
              .Color("#979797")
              .Width(2)
              )
              )
)

and when I click I want the diagram to reload and get new data without refreshing the page. It would be also solution to inject new data into diagram. 

Is there any way to to any of these?

Daniel
Telerik team
 answered on 07 Jul 2015
1 answer
167 views

Hello,

 I'm trying to add the ability for the user to refresh manually the tree list view. I was able to display the reload icon on others telerik controls but can't find the way to do it on a tree list.

Code:

@(Html.Kendo().TreeList<Document>()
                        .Name("sharepointdocumentviewertreelist")
                        .Columns(columns =>
                        {
                            columns.Add().Field(e => e.Title).Width(180).TemplateId("documenttitle-template");
                            columns.Add().Field(e => e.SPItemId).Width(20).Hidden(true);
                            if (Model.showTaskIDColumn)
                            {
                                columns.Add().Field(c => c.TaskID).Width(30).Title("Task ID").Hidden(true);
                            }
                            columns.Add().Field(c => c.EmailFrom).Width(65).Hidden(false);
                            columns.Add().Field(c => c.ExchangeReceivedTime).Width(40).Template("#=kendo.toString(kendo.parseDate(data.ExchangeReceivedTime, 'yyyy-MM-dd'), 'dd/MM/yyyy') #").Title("Received").Hidden(false);
                            columns.Add().Field(c => c.EmailTo).Width(75).Hidden(true);
                            columns.Add().Field(c => c.LinkToItem).Width(190).Hidden(true);
                            columns.Add().Field(c => c.EmailId).Width(190).Hidden(true);
                            columns.Add().Field(c => c.IsParentEmail).Hidden(true);
                            columns.Add().Field(c => c.EmailBody).Hidden(true);
                            columns.Add().Field(c => c.DocumentType).Hidden(true);
                            columns.Add().Field(c => c.FileNoteId).Hidden(true);
                        })
                        .Filterable()
                        .Sortable()
                        .Selectable(true)
                        .Scrollable(true)
                        .Events(events =>
                        {
                            events.Change("SharepointDocumentViewerTreelistOnChange").DataBound("DocViewerDataBound");
                        })
                        .DataSource(dataSource => dataSource
                            .Read(read => read.Action("GetDocumentsMetadata", "Documents", new RouteValueDictionary(){
                                { "spItemId", Model.spItemID }, { "emailID", Model.emailID }, { "caseID", Model.caseID }}))
                            .ServerOperation(false)
                            .Model(m =>
                            {
                                m.Id(f => f.SPItemId);
                                m.ParentId(f => f.ParentSPItemID);
                                m.Field(f => f.FileType);
                                m.Field(f => f.Title);
                            })
                        )
                        .Height(200)
                    )

 

Thanks in advance,

Tiago

Dimo
Telerik team
 answered on 07 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?