Telerik Forums
UI for ASP.NET Core Forum
2 answers
786 views

Hi,

I have the Problem that no Icon (glyphicon or Kendo icon) is shown with "SpriteCssClasses " in Toolbar and Context menu (see attached Pictures)

 

<!--ContextMenu-->
    @(Html.Kendo().ContextMenu()
      .Name("ctmStandort")
      .Target("#grdStandort").Filter("button").AlignToAnchor(true).ShowOn("click")
      .Orientation(ContextMenuOrientation.Vertical)
      .Animation(false)
      .Items(items =>
      {
          items.Add()
              .Text("Öffnen");
          items.Add()
              .Text("Neu").SpriteCssClasses("glyphicon glyphicon-plus")
              .Items(children =>
              {
                  children.Add().Text("Akt hinzufügen");
                  children.Add().Text("Profil hinzufügen");
              });
          items.Add()
              .Text("Stammblatt").SpriteCssClasses("k-icon k-i-print k-i-printer")
              .Items(children =>
              {
                  children.Add().Text("Intern");
                  children.Add().Text("Intern-Selbstdefiniert");
                  children.Add().Separator(true);
                  children.Add().Text("Extern");
                  children.Add().Text("Extern-Selbstdefiniert");
              });
          items.Add()
              .Text("Löschen").SpriteCssClasses("k-icon k-i-table-row-delete").Enabled(true);
      })
    )
    <!--End ContextMenu-->
Robert Madrian
Top achievements
Rank 1
Veteran
Iron
 answered on 17 Feb 2017
2 answers
120 views

We have started building a new ASPNETCORE project and are using Visual Studio 2015 with TFS 2015 Update 3, I am wondering what I need to do to get the project building with Telerik controls? 

 

I have a non Telerik control ASPNETCORE project working and building just fine, but for some reason I can not find what I need to do to be able to get the telerik controls to resolve during the build process. 

 

The error we see is: Unable to resolve 'Telerik.UI.for.AspNet.Core.Trial (>= 2016.3.1118)' for '.NETFramework,Version=v4.5.2'.

I am restoring the other dependencies but it fails on this. 

Also we recently purchased the control  so this should switch from the Trial version of Telerik to the full version of Telerik. 

Any guidance you can provide is greatly appreciated. 

 

Thanks,

Nick 

Unable to resolve 'Telerik.UI.for.AspNet.Core.Trial (>= 2016.3.1118)' for '.NETFramework,Version=v4.5.2'.
Unable to resolve 'Telerik.UI.for.AspNet.Core.Trial (>= 2016.3.1118)' for '.NETFramework,Version=v4.5.2'.
Unable to resolve 'Telerik.UI.for.AspNet.Core.Trial (>= 2016.3.1118)' for '.NETFramework,Version=v4.5.2'.
Stefan
Telerik team
 answered on 13 Feb 2017
3 answers
362 views

I have 3 level grid (Hierarchy sample)

I have problems if I want to edit all grids in popup editor.

First level grid open popup edit dialog with no problem but 2 and 3d level grids generate "Invalid template" error when I try to add row.

I tried to run this without EditorTemplate and with editor template with same effect (mean default editor template for my apartment is no good to kendo)

first grid

@(Html.Kendo().Grid<Dispatcher.Models.BlocksVM>()
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(e => e.InhabitatLocationCalculated);
            columns.Bound(e => e.Address);
            columns.Bound(e => e.NumberOfApartments);
            columns.Bound(e => e.Entrances);
            columns.Bound(e => e.Stages);
            columns.Command(command => { command.Edit().Text(" "); command.Destroy().Text(" "); }).Width(180);
        })        
        .Sortable()
        .Pageable()
        .Scrollable(s => s.Height("1000px"))
        .ToolBar(toolbar => toolbar.Create())
        .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("Block").Window(w=>w.Title("Добавление  / изменение дома")))
        .Selectable()
        .ClientDetailTemplateId("ApartmentsTemplate")
        .HtmlAttributes(new { style = "height:100%;" })
        .DataSource(dataSource => dataSource
            .Ajax()
            .PageSize(20)
            .Read(read => read.Action("Blocks_Read", "Clients"))
            .Model(model => model.Id(m => m.BlockId))
            .Create(action => action.Action("Block_Create", "Clients"))
            .Update(action => action.Action("Block_Update", "Clients"))
            .Destroy(action => action.Action("Block_Destroy", "Clients"))
            .Events(events => events.RequestEnd("cancel"))
        )
        .Events(events => events.DataBound("dataBound"))
)

and client template

<script id="ApartmentsTemplate" type="text/kendo-tmpl">
    @(Html.Kendo().Grid<Dispatcher.Data.Apartment>()
            .Name("Apartments_#=BlockId#")
            .Columns(columns =>
            {
                columns.Bound(o => o.Number);
                columns.Bound(o => o.Floor);
                columns.Bound(o => o.Entrance);
                columns.Command(command => { command.Edit().Text(" "); command.Destroy().Text(" "); }).Width(180);
            })
            .ToolBar(toolbar => toolbar.Create())
            .Editable(editable => editable.Mode(GridEditMode.PopUp))
            .ClientDetailTemplateId("ClientsTemplate")
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(10)
                .Model(model => model.Id(m => m.ApartmentId))
                .Events(events => events.Error("error_handler"))
                .Read(read => read.Action("Apartments_Read", "Clients", new { BlockId = "#=BlockId#" }))
                .Destroy(action => action.Action("Apartment_Destroy", "Clients"))
                .Update(action => action.Action("Apartment_Update", "Clients"))
                .Create(action => action.Action("Apartment_Create", "Clients", new { BlockId = "#=BlockId#" }))
            )
            .Pageable()
            .Sortable()
            .Selectable()
            .ToClientTemplate()
    )
</script>

3d level grid shows same behaviour

So when I have NO EditorTemplates for my Apartment model I have error

if I add Apartment.aspx under  EditorTemplates like

@model  Dispatcher.Data.Apartment

<div class="k-edit-label">
    @Html.LabelFor(model => model.Number)
</div>
<div class="editor-field">
    @Html.Kendo().TextBoxFor(m => m.Number).HtmlAttributes(new { style = "width:100%;" })
</div>
<div class="k-edit-label">
    @Html.LabelFor(model => model.Entrance)
</div>
<div class="editor-field">
    @Html.Kendo().TextBoxFor(m => m.Entrance).HtmlAttributes(new { style = "width:100%;" })
</div>
<div class="k-edit-label">
    @Html.LabelFor(model => model.Floor)
</div>
<div class="editor-field">
    @Html.Kendo().TextBoxFor(m => m.Floor).HtmlAttributes(new { style = "width:100%;" })
</div>

 

also error.

Now I  found that it works then I do have Apartment.aspx under  EditorTemplates and file is EMPTY.

In this case it open popup dialog on 2d level grid with standard template.

Also I compared my view with AjaxHierarchyEditing.sln found here in AJAX section and I see absolutely no difference.

 

also wrong template looks like this (this is generated - from crome debugger - I just added return for readability)

<div class="k-edit-label">    
<label for="Number">&#x41D;&#x43E;&#x43C;&#x435;&#x440;</label>
</div>
<div class="editor-field">    
<input class="k-textbox" data-val="true" data-val-required="&#x423;&#x43A;&#x430;&#x436;&#x438;&#x442;&#x435; &#x43D;&#x43E;&#x43C;&#x435;&#x440; &#x43A;&#x432;&#x430;&#x440;&#x442;&#x438;&#x440;&#x44B;" id="Number" name="Number" style="width:100%;" value="" />
</div>

Angel Petrov
Telerik team
 answered on 08 Feb 2017
0 answers
74 views
how to generate autoscrolling without overlapping lables and datapoints in telerik radhtmlcolumnchart ?...
MERSHA
Top achievements
Rank 1
 asked on 08 Feb 2017
0 answers
65 views

Hi,

The first time I click on submit on my form, the values from the RadListBox are read, but when going back on the page although the same items are still selected if I click submit for the second time, the values of the item selected are read as null. I have to actually uncheck and check again the items from the list for this to be read again. Do you know what might be the issue here?

This is what I have on my search.aspx.cs file:

 

            int eCount = 0;
            String strEvalReasonList = String.Empty;

           
            IList<RadListBoxItem> collectionEvalReasons = rlbEvalReasons.CheckedItems;
            foreach (RadListBoxItem exp in collectionEvalReasons)
            {

               // Response.Write(exp.Value + ":" + exp.Text + "<BR>");
               

                // foreach (RadListBoxItem exp in rlbEvalReasons.CheckedItems)
                // {

                if (exp.Value.ToString() == "All")
                {
                    Session["EvalReasonList"] = null;
                    break;
                }
                else
                {
                    if (eCount > 0)
                    {
                        strEvalReasonList += ",";
                    }
                    strEvalReasonList += "'" + exp.Value.ToString() + "'";
                    eCount++;
                }
            }
                if (strEvalReasonList==String.Empty)
                {
                    Session["EvalReasonList"] = null;
                }
                else
                {
                    Session["EvalReasonList"] = strEvalReasonList.ToString();
                }

 

 

Thanks

Violeta
Top achievements
Rank 1
 asked on 08 Feb 2017
1 answer
210 views

Instructions for setting-up a NuGet private feed on your development machine are given at http://docs.telerik.com/aspnet-mvc/getting-started/nuget-install. The following instructions allow you to do the same when running MSBuild on a Build machine such as hosted by Azure.

  1. Add NuGet.config to WebApp project in Visual Studio
    • Add new item NuGet.config to same directory as project.json and edit as below, setting your own username and password (in clear text) as needed to logon to the Telerik site:
      <?xml version="1.0" encoding="utf-8"?>
      <configuration>
          <packageSources>
               <add key="Telerik" value="https://nuget.telerik.com/nuget/" />
          </packageSources>
          <packageSourceCredentials>
            <Telerik>
              <add key="Username" value="will.***@****.com" />
              <add key="ClearTextPassword" value="********" />
            </Telerik>
          </packageSourceCredentials>
      </configuration>
  1. Edit Build Definition to add step for NuGet installer - In Visual Studio a) select Team Explorer, Builds b) select Build Definition, right click | Edit Build Definition. This opens the Build Definition in your browser - see attached screen shot
  2. In Build Definition editor add build step = Nuget Installer, drag/drop to top of list and specify the solution file as well as the NugGet.config
  3. Save
  4. Save your changes to source control for the WebApp in Visual Studio - i.e. the Build Definition and NuGet.config
  5. Queue a New Build

I hope this saves someone a bit of time.

Will

 

 

 

Ianko
Telerik team
 answered on 02 Feb 2017
2 answers
530 views

Anybody else having trouble setting the height of a grid in asp.net core?

@(Html.Kendo().Grid<Basic_Core.Models.Authors>()
    .Name("grid")
    .HtmlAttributes(new { style = "height:850px;" })

etc......

No matter what height I set it always renders with 400px. This even happens with the demo grid from Telerik.

The exact same code works just fine  with MVC5

@(Html.Kendo().Grid<Basic_MVC.Models.Authors>()
    .Name("grid")
    .HtmlAttributes(new { style = "height:850px;" })

etc.....

 

Would be really grateful for an insightful answer.

 

 

Hugo
Top achievements
Rank 1
 answered on 31 Jan 2017
2 answers
1.8K+ views

Telerik Team,

 

I am doing a POC to demo the Kendo UI ASP.NET Core components for our application. I would like to know how to apply the themes (such as Blue Opal, Bootstrap, Fiori, Flat, High Contrast, Material, Metro, Moonlight, Nova etc.,) that are shown on the top of Telerik demo pages. Please see the attached snapshot for reference. When we select any theme on the list, the Grid control will change the display accordingly. However, I do not find the code to apply the themes. Please provide the sample or link where I could find the code. Thanks in advance.

 

Regards,

Naga

Naga
Top achievements
Rank 1
 answered on 30 Jan 2017
1 answer
663 views

Users can see textarea with html tags while Editor is loading.

<div class="form-group">
    <label asp-for="Description" class="col-md-2 control-label"></label>
    <div class="col-md-6">
        @(Html.Kendo().EditorFor(model => model.Description)
          .HtmlAttributes(new { style = "width: 100%;height:440px;" })
          .Tools(tools => tools
              .Clear()
              .Bold().Italic().Underline().Strikethrough()
              .InsertUnorderedList().InsertOrderedList()
              .Formatting()))
        <span asp-validation-for="Description" class="text-danger"></span>
    </div>
</div>

 

Is there a way to hide the textarea until Editor is loaded?

Thank you

Rumen
Telerik team
 answered on 23 Jan 2017
3 answers
243 views

Hi everyone

 

I'm using Kendo/Angular 2 grid with custom filters, paging and sorting and ASP.NET Core on the server side.

When sending POST request from client side, I have to format request parameters to "form data" because server side bindings uses that format by default in order to retrieve data for the grid.

Is there a way to configure server side code to accept json format instead of form data?

I have found an open source library which might do that: https://github.com/kendo-labs/dlinq-helpers but I'm wondering is there an option to do all this with standard Kendo.Mvc.UI library?

 

Thanks

Vladan

Konstantin Dikov
Telerik team
 answered on 23 Jan 2017
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?