Hi guys,
I am use in .net core 2.0 project, and use the internal version 2017.2.823, but I find a problem is the culture setting is not work. I want to use the chinese culture and messages.
In _Layout.chtml I include the kendo js files and style files like this:
<script src="~/lib/kendo-ui/js/kendo.all.min.js"></script>
<script src="~/lib/kendo-ui/js/cultures/kendo.culture.zh-CN.min.js"></script>
<script src="~/lib/kendo-ui/js/kendo.aspnetmvc.min.js"></script>
<script type="text/javascript">
kendo.culture("zh-CN");
</script>
Please help me, thanks.
Regards
Train
How do I prevent content in my Grid cells from wrapping when the text in the cell i too long?
See attached image.
Hi,
I want to remove some filter menu options, but for ASP.NET core gird it didnt' work at all. Even your sample is buggy http://demos.telerik.com/aspnet-core/grid/filter-menu-customization. When I switch to pure JS smaple it will work properly.
Hello all
I`m using grid Kendo UI with filtering for Angular 2 and i want to change filter operation language from English to Germany
How can I do that in Angular 2 ?
please watch the attach file
<script type="text/x-kendo-tmpl" id="InProgressTasktemplate">
<div class="iplist">
Task ID : #:TaskID#<br /> <br />
Task Name : #:TaskName#<br /><br />
From: #= kendo.toString(new Date(PlannedStartDate), 'dd/MM/yyyy') #
To: #= kendo.toString(new Date(PlannedDeliveryDate), 'dd/MM/yyyy') #<br /><br />
Ids: #:Ids#<br /><br />
# function getProfilePics(Ids) { #
var temp = new Array();
temp = Ids.split(",");
return temp;
# } #
# for (var i = 0; i < temp.length; i++) { #
<div>#=temp[i] #</div>
<img border="0" alt="profilePicture" id="profileimg" src='@Url.Action("RenderProfileImage", "TT", new { keyUserProfileId = "temp[i]" })' width="30" height="30">
# } #
</div>
</script>
I'm having issue for above kendo template code.
function getProfilePics(Ids) is function of split #:Ids# and ID set assign to the array and array values pass to the for loop.
Inside the for loop array value pass to the url action load image one by one.
But for loop does not working.
Is there any way to simulate the behavior of a wind direction gauge, using the radial gauge template for .NetCore?
Ive been trying different ways but the angles of the gauge doesnt give me the desired output.
Attached to this, theres a example of what i want to accomplish.
Thanks!
Im having trouble with the KendoUI grid for .NETCore, always firing the create method.
Im using the edit inline template, expecting to fire the update method in the controller when the user updates a row.
Also the delete method is not being fired.
Basically made a helper class, put all the properties from 3 different models in a single class so i can handle it in the current form.
I think its something about not recognizing if its a new item on the grid, or a old item.
Any help would be greatly appreciated
Helper class example(didnt add the whole class, bunch of int fields and strings):
public class DJForm
{
public int Id { get; set; }
[ScaffoldColumn(false)]
public int? UserId { get; set; }
[ScaffoldColumn(false)]
public int LocationId { get; set; }
[ScaffoldColumn(false)]
public DateTime? ExposureMonth { get; set; }
[ScaffoldColumn(false)]
public string FiltrationUser { get; set; }
[ScaffoldColumn(false)]
public string PostWeighingUser { get; set; }
}
Grid:
@(Html.Kendo().Grid<RTEMSDataLayer.UIResources.DJForm>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.LocationJarId).Width(70).HeaderHtmlAttributes(new { style = "font color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.ExposureStartOn).Width(170).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.ExposureEndOn).Width(170).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;width:170px;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.FilterId).Width(95).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.CrucibleNumber).Width(70).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.LiquidSample).Width(70).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.PreWeight).Width(70).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.PostWeight).Width(70).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Bound(p => p.RowComment).Width(200).HeaderHtmlAttributes(new { style = "font-color:black;font-size:x-small;height:auto;white-space:normal;text-align: center;font-weight:bold" });
columns.Command(command => { command.Edit(); command.Destroy(); }).Width(100);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InLine))
.Pageable()
.Sortable()
.Scrollable()
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(30)
.Events(e => e.Error("error_handler"))
.Model(model =>
{
model.Id(p => p.Id);
})
.Create(update => update.Action("EditingInline_Create", "DustJarDatas").Data("additionalData"))
.Read(read => read.Action("EditingInline_Read", "DustJarDatas"))
.Update(update => update.Action("EditingInline_Update", "DustJarDatas"))
.Destroy(update => update.Action("EditingInline_Destroy", "DustJarDatas"))
)
)
Update Action:
[AcceptVerbs("Post")]
public IActionResult EditingInline_Update([DataSourceRequest] DataSourceRequest request, DJForm form)
{
if (!ModelState.IsValid)
{
ModelState.AddModelError("error", "error");
return Json(new[] { form }.ToDataSourceResult(request, ModelState));
}
if (form != null && ModelState.IsValid)
{
//DustJarData dj = _context.DustJarData.Find(form.LocationJarId);
//dustjardata.LocationJarId = form.LocationJarId;
//dustjardata.ExposureStartOn = dateExpStart;
//dustjardata.ExposureEndOn = dateExpEnd;
// productService.Update(p);
}
return Json(new[] { form }.ToDataSourceResult(request, ModelState));
}
Create Action example:
public IActionResult EditingInline_Create(string data, [DataSourceRequest] DataSourceRequest request, DJForm form)
{
string[] rawData = data.Split(',');
if (rawData[0] != null) {
form.UserId = Int32.Parse(rawData[0]);
}
if (rawData[1] != null) {
form.LocationId = Int32.Parse(rawData[1]);
}
if (rawData[2] != null) {
form.ExposureMonth = DateTime.Parse(rawData[2]);
}
if (rawData[3] != null) {
form.FiltrationUser = rawData[3];
}
if (rawData[4] != null) {
form.PostWeighingUser = rawData[4];
}
if (rawData[5] != null) {
form.ProcessSessionOn = DateTime.Parse(rawData[5]);
}
if (rawData[6] != null) {
form.WeighingSessionOn = DateTime.Parse(rawData[6]);
}
if (rawData[7] != null) {
form.ProcessTemp = Int32.Parse(rawData[7]);
}
if (rawData[8] != null)
{
form.ProcessRh = Int32.Parse(rawData[8]);
}
if (rawData[9] != null)
{
form.WeighingTemp = Int32.Parse(rawData[9]);
}
if (rawData[10] != null)
{
form.WeighingRh = Int32.Parse(rawData[10]);
}
if (!ModelState.IsValid) {
ModelState.AddModelError("101", "errors");
ViewBag.Error = "102";
return Json(new[] { form }.ToDataSourceResult(request, ModelState));
}
if (form != null && ModelState.IsValid)
{
....
....
....
}
Hello,
I need to show in a grid a ModelView of a complex object, with about 50 different fields.
If editing in inline or popup mode, I would need to scroll to much (horizontally or vertically) so I need to build a completely personalized form to insert/update data.
How is it possible to link to a personalized view from a EDIT/ADD buttons from the asp.net core grid?
And how to pass the mode (Insert or Update) and the ID (for Update operations) to this view?
Have you a sample code?
Thanks a lot,
Davide