Telerik Forums
UI for ASP.NET Core Forum
1 answer
927 views
I have a table, the column "IsSampling" is bool type(or nvarchar type, value is 'true' or 'false'). I set the model type to Boolean, it can be change to a checkbox in cell edit mode. I want to show checkbox checked or unchecked in grid instead of true or false. How can I get it.
Tsvetomir
Telerik team
 answered on 21 Nov 2018
7 answers
940 views

I have this definition for my treeview:

<script id="treeview-template" type="text/kendo-ui-template">
    #: item.text #
    # if (!item.items) { #
    <a class='delete-link' href='\#'></a>
    # } #
</script>
 
<div class="demo-section k-content">
    <h4>Recursive data</h4>
    @(
    Html.Kendo().TreeView()
        .TemplateId("treeview-template")
        .Name("treeview-right")
        .BindTo((IEnumerable<Item>)ViewBag.recursive, (NavigationBindingFactory<TreeViewItem> mappings) =>
        {
            mappings.For<Item>(binding => binding.ItemDataBound((item, group) =>
            {
                item.Text = group.Name;
                item.ImageUrl = group.ImageUrl;
            })
                .Children(group => group.Items));
        })
          )
</div>

 

I'm generally struggling with formatting.  How do I vertically center the item.Text so that the Text is not posted at the top of the image?  The image url is quite tall and it doesn't look right.  Also, how do I ensure that the text is not cut off when it is long.  I attached a picture.

Marin Bratanov
Telerik team
 answered on 21 Nov 2018
1 answer
780 views

I've been a developer for a long time.  I've also been avoiding JavaScript for a long time.  If I'm going to learn ASP.NET Core and use Telerik controls, how much JavaScript must I learn?

When I open the Kendo.Mvc.Examples and look in the wwwroot.lib Folder, I get quite overwhelmed with the sheer number of .js files there.   

I have created a web site utilizing Razor pages and that was quite intuitive.  I can use C# syntax on the pages and the MVC methodologies are easy to follow.  But now, I am attempting to use the Telerik Kendo TreeView and I am bogged down into trying to figure out what script(s) I'm missing in order to get this to work right.  

So, does this mean there is no way I'm going to avoid JavaScript in order to use Telerik Kendo controls.  If not, I need some directions where to start.  There is way to much in the environment to take it all in at once.  Do I need to starting drinking JavaScript from a fire hose in order to get this working?

Thanks in advance for your help,

Joel

Marin Bratanov
Telerik team
 answered on 21 Nov 2018
12 answers
582 views

Hi,

I'm following the steps found here : http://docs.telerik.com/kendo-ui/aspnet-mvc/mvc-core/getting-started#prerequisites

At step 6 it says "Copy the js and styles folders from the telerik.ui.for.aspnetmvc archive to wwwroot\lib\kendo-ui"

But I could'nt find where these files are located. WHere is this archive folder located?

I can't find any in C:\Program Files (x86)\Telerik\

Anything I missed?

Bozhidar
Telerik team
 answered on 19 Nov 2018
2 answers
630 views
I want to set grid header style. I want to use html-attributes property. How to set html-attributes?
Vincent
Top achievements
Rank 1
Iron
 answered on 16 Nov 2018
3 answers
385 views

I have not seen an example on how to bind the TreeView to an object.  I have a simple class that looks like this:

class Group
{
    int id,
    string name,
    List<Group> children
}

Can you provide me with an example?

Thanks in advance for your help, Joel

Dimitar
Telerik team
 answered on 16 Nov 2018
9 answers
1.1K+ views

I am having problem with pdf export with header template, we use letter size but however papersize "letter" in pdf export doesn't include all fields and so smaller in size

going up on paper size does help like using A1 is perfect but we use letter for everything, 

here below is what I have... 

 

<script type="x/kendo-template" id="Pdf-template">

    <div class="page-template">
        <div class="header">
            <div style="border:1px solid black;width:35%;float:left;padding:10px;">
                <div>Scenario: <b>@ViewBag.Rule</b></div>
                <div>Scenario\#: <b>3</b></div>
                <div>
                    <div style="float:left">
                        Run Date:  <b>@DateTime.Now.ToShortDateString() </b>
                    </div>
                    <div style="float:right;padding-left:20px;">
                        Rule Version: <b>@ViewBag.RuleVersion</b>
                    </div>
                </div>
                <br />
                <div>Data Ingestion:  <b>@ViewBag.DataIngestion.ToShortDateString()</b></div>
            </div>
            <div style="border:1px solid black;float:left;width:20%;padding:10px;margin-left: 15%;">
                <div> Total Patient Population:  <b id="TotalPatients1">@ViewBag.TotalPatients</b></div>
                <div>
                    <div style="float:left"> Matching Patient Population:  <b id="MatchingPatients1">@ViewBag.MatchingPatients</b> </div> <div style="float:right;margin-right:5%;"> <b id="MatchingPercentage1">@((((double)ViewBag.MatchingPatients / (double)ViewBag.TotalPatients)).ToString("P2"))</b></div>
                </div>
            </div>
        </div>
    </div>
</script>

.Pdf(pdf => pdf
                        .AvoidLinks()
                        .AllPages(true)
                        .PaperSize("Letter")
                        .Margin("5.5cm", "1cm", "1cm", "1cm")
                        .Landscape()
                        .RepeatHeaders(false)
                        .TemplateId("Pdf-template")
                        .FileName("filename.pdf")
                        .ProxyURL(Url.Action("Pdf_Export_Save", "Grid"))
                    )

 

arun
Top achievements
Rank 1
 answered on 15 Nov 2018
6 answers
177 views

.net core kendo ui

grid has a toolbar template however on pdf export by default it should export with toolbar template but its not, i am not hiding it on export either 

is there anything i am missing

.ToolBar(toolbar =>  {    toolbar.ClientTemplateId("PatientGridToolbarTemplate");                   

 })                           .Columns(columns 

arun
Top achievements
Rank 1
 answered on 15 Nov 2018
2 answers
245 views

Hello,

 

In the demo pages (https://demos.telerik.com/aspnet-core/maskedtextbox/index), removing the value from the masked text box and then re-focusing the control places the cursor at the start of the input. This behavior does not appear to be default, as when I used a masked textbox in my project the cursor appears in the middle of the mask (wherever was clicked). I also don't see any mention of it in the demo pages or documentation. Is there a simple way of enabling this behavior?

 

I am using the current release of UI for ASP Core.

<kendo-maskedtextbox name="phone" class="form-control" mask="(999) 000-0000" value="@Model.SearchModel.Phone"></kendo-maskedtextbox>

 

Josh
Top achievements
Rank 1
 answered on 15 Nov 2018
8 answers
150 views

Hello,

we are using one custom LESS-file to configure our kendo theme and get our generated, bundled result CSS file. This LESS-file is referencing the specific theme files (in our case 'office365') inside the kendo styles-folder. Unfortunately there are rules with the 'calc' function, that are specially handled by the LESS compiler. Its not pushing the default statement to the CSS file, but a self-calculated one.

 

So this (kendo.common-office365.less - line 92):

calc(1.143em + (2*@button-padding-y) + 2px)

gets converted in the result CSS to this:

calc(4.001em)

 

And thats a wrong value, that shows me oversized buttons in the UI. To prevent this behaviour you should use the rule like this:

~'calc(1.143em + (2*@{button-padding-y}) + 2px)'

which gets the following correct result in the CSS file:

calc(1.143em + (2*.429em) + 2px)

Jan
Top achievements
Rank 1
 answered on 14 Nov 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
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
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?