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
Installer and VS Extensions for ASP.NET Core
Visual Studio Integration Overview
A new article on how to enhance your experience in developing web applications with ASP.NET Core.
Downloading New Versions
A new article on how to keep your projects updated when using Telerik UI for ASP.NET Core.
Creating Projects
A new article on how to create a new Telerik UI for ASP.NET Core application.
Telerik Team,
We are working on the ASP.NET Core web application development and planning to use Kendo UI ASP.NET Core Components. Currently I am evaluating the ASP.NET Core Components for usage in our application. While going thru the demos, I have observed that the ASP.NET Core Components comes in two versions: ASP.NET MVC and HTML/JavaScript. After looking at the demos, I understand that the HTML/JavaScript version involves writing lot of HTML/JavaScript code, where was the ASP.NET MVC version code is compact. I would like to know what are the pros and cons of one over the other. Please provide any document or URL which gives the differences between these two versions and which one will be the better option to use in ASP.NET Core web application. Thanks in advance.
Regards,
Naga
I am trying to implement a grid with a foreign key Column.
I am using your example
http://demos.telerik.com/aspnet-core/grid/foreignkeycolumn
I am trying to understand the right way to implement the editor template, unfortunately you didn't provide a full working example.
this is the error:
An unhandled exception occurred while processing the request.
ArgumentNullException: Value cannot be null.
Parameter name: items
.ctor
And this is the view
@(Html.Kendo().Grid<TraderMade.Models.Market>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(c => c.Name).Width(200);
columns.ForeignKey(p => p.CountryId, (System.Collections.IEnumerable)ViewData["countries"], "Id", "Name")
.Title("Nazione").Width(150);
columns.Bound(c => c.City).Title("Città ").Width(150);
columns.Bound(c => c.MIC).Title("Codice").Width(80);
columns.Bound(c => c.WebSiteUrl).Title("Web site").Width(250);
columns.Command(command => command.Destroy()).Width(110);
})
.Filterable(ftb => ftb.Mode(GridFilterMode.Menu))
.HtmlAttributes(new { style = "height: 380px;" })
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Scrollable()
.Groupable()
.Sortable()
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
.Model(model => model.Id(p => p.Id))
.Create("Countries_Create", "Home")
.Read("Countries_Read", "Home")
.Update("Countries_Update", "Home")
.Destroy("Countries_Delete", "Home")
).Deferred()
)
this is the relevant part of the controller
private void PopulateCountries()
{
var countries = _context.Countries.ToList();
ViewData["countries"] = countries;
ViewData["defaultCountry"] = countries.First();
}
public IActionResult Index()
{
PopulateCountries();
return View();
}
public ActionResult Countries_Read([DataSourceRequest] DataSourceRequest request)
{
var markets = _context.Markets;
DataSourceResult result = markets.ToDataSourceResult(request);
return Json(result);
}
I have read somewhere that I need to create a folder in views\shared\EditorTemplates, in this folder I have created
GridForeignKey.cshtml
@model object
@(
Html.Kendo().DropDownListFor(m => m)
.BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
.ValuePrimitive(true)
)
here the model:
public class Country
{
public int Id { get; set; }
public string Name { get; set; }
public string CodeAlpha2 { get; set; }
public string CodeAlpha3 { get; set; }
public int CodeNumeric { get; set; }
public ICollection<Market> Markets { get; set; }
}
public class Market
{
public int Id { get; set; }
public string MIC { get; set; }
public string Code { get; set; }
public string Name { get; set; }
public string City { get; set; }
public string WebSiteUrl { get; set; }
public string Notes { get; set; }
public bool IsEnabled { get; set; }
public int CountryId { get; set; }
[ForeignKey("CountryId")]
public Country Country { get; set; }
}
I have tried to use ViewModel instead of model, but no matter what i write in columns.ForeignKey I have always the same error.
thank you for the support
Telerik Team,
I am evaluating the ASP.NET Core Components for usage in our project development. I do not find the (generic) TextBox control in your widgets list. Could you please let me know if the TextBox control is available. If not, please let me know any alternative control to be used.
Thanks,
Naga
I am an intern programmer working on an already existing and expansive model. This is my first experience with Kendo UI. What I can say is that, the current model (coded by a previous programmer), seems to be in working order (and has been long before my arrival). I have been assigned to try to correct one minor aesthetic flaw...
Here is the scenario - When the grid appears, there is a ddl, date field, edit btn, and delete btn. The grid is editable "inline". The grid is rendering as it should (i.e. all selections and fields have specified data). Also, comms on the back end are working properly.
Here is the issue - However, when I click the edit btn, the value displayed within the ddl temporarily disappears. The value then reappears when the "update" or "cancel" btns are clicked.
My question - Is this temporary disappearance a bug in the code, or (more specifically) is the kendo grid designed to clear the ddl display when the edit btn is clicked?
Thank you in advance!