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-->
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
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">Номер</label>
</div>
<div class="editor-field">
<input class="k-textbox" data-val="true" data-val-required="Укажите номер квартиры" id="Number" name="Number" style="width:100%;" value="" />
</div>
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
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.
I hope this saves someone a bit of time.
Will
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.
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
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
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