Hi
I Have a grid like this :
01.
@(Html.Kendo().Grid<TMain>()
02.
.Name(
"gridEQ"
)
03.
.Columns(c =>
04.
{
05.
c.Group(g =>
06.
g.Title(
"History"
)
07.
.Columns(i =>
08.
{
09.
i.Bound(x => x.History.HairLoss).ClientTemplate(
"#= History.HairLoss ? 'Yes' : '' #"
);
10.
i.Bound(x => x.History.WT_Gain).ClientTemplate(
"#= History.WT_Gain ? 'Yes' : '' #"
);
11.
i.Bound(x => x.History.Wt_loss).ClientTemplate(
"#= History.Wt_loss ? 'Yes' : '' #"
);
12.
})
13.
);
14.
c.Group(g =>
15.
g.Title(
"PmhDh"
)
16.
.Columns(i =>
17.
{
18.
i.Bound(x => x.PmhDh.Levothyroxine);
19.
})
20.
);
21.
})
22.
.Sortable()
23.
.Pageable()
24.
.Scrollable()
25.
.DataSource(d => d
26.
.Ajax()
27.
.PageSize(20)
28.
29.
.ServerOperation(
true
)
30.
.Read(r => r.Action(
"SendData"
,
"MyAction"
))
31.
32.
))
I want hide columns if all cell of column was empty value and if all columns of a group was hide the column of group also hide too .
for example if Levothyroxine column data was empty string the Levothyroxine column hide and PmhDh hide too.
my problem is i have 230 columns that i must show in this grid and i want hide empty columns
Hi,
I am trying to have a list of Offices for an Organisation edited from a tabstrip, i can load the data and perform modifications easily but my problem arises when i want to add a new office when i click on a button. i use the API to add a tab but i do not know if it is possible for me to specify that the content should be loaded from an action.
Hello Team;
Do we have a Kanban Widget in Kendo UI for ASP.Net Core 2.1?
I saw an application that had used Kendo UI jQuery widget and they told me their Kenban widget was from Telerik. However, when I look at t he list of ASP.Net core widgets I can't find any with that name.
Could you please shed some light where to find it?
Thanks!
Hi
I have a Class like this :
public
class
History
{
public
bool
Wt_loss {
get
;
set
; }
public
bool
WT_Gain {
get
;
set
; }
public
bool
HairLoss {
get
;
set
; }
}
public
class
PmhDh{
public
string
Levothyroxine {
get
;
set
; }
}
public
class
Datum{
public
History History {
get
;
set
; }
public
PmhDh PmhDh {
get
;
set
; }
}
and i fill the main class with some data
i want to show this class in kendo grid mvc wit main header and sub header but i my code not work correctly
this is my grid code :
@(Html.Kendo().Grid<
dynamic
>()
.Name("gridEQ")
.Columns(columns => columns.AutoGenerate(true))
.Sortable()
.Pageable()
.Scrollable()
.DataSource(d => d
.Ajax()
.PageSize(20)
.ServerOperation(true)
.Read(r => r.Action("SendData", "Thyroid"))
))
and attach the result on this post
please help me
thanks
@(Html.Kendo().Grid<BitteleERP.MVC.Models.Corporation>()
.Name("grid")
.Columns(columns =>
{
columns.Command(command => command.Custom("Edit").Click("edit")).Width(40);
columns.Command(command => command.Custom("Delete").Click("deleted")).Width(40);
columns.Bound(c => c.Name).Width(140);
columns.Bound(c => c.Location).Width(190);
columns.Bound(c => c.DefaultCurrency).Width(100);
})
.ToolBar(toolbar =>
{
toolbar.ClientTemplateId("GridToolbarTemplate");
})
.HtmlAttributes(new { style = "height: 380px;" })
.Sortable()
.Scrollable(scrollable => scrollable.Virtual(true))
.HtmlAttributes(new { style = "height:84vh;" })
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Read", "Corporation"))
)
)
<script id="GridToolbarTemplate" type="text/x-kendo-template">
<div class="refreshBtnContainer">
<a href="/Corporation/New" data-ajax="true" data_ajax_method="GET" data_ajax_mode="replace" data-ajax-update="#ajax-content" class="k-pager-refresh k-link k-button " style="float:left" title="Add New"><span>Add New</span></a>
</div>
</script>
--
data-ajax-update="#ajax-content" with # is not working with kendo
---
ncaught Error: Invalid template:'
<div class="refreshBtnContainer">
<a href="/Corporation/New" data-ajax="true" data_ajax_method="GET" data_ajax_mode="replace" data-ajax-update="#ajax-content" class="k-pager-refresh k-link k-button " style="float:left" title="Add New"><span>Add New</span></a>
</div>
' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='\n <div class="refreshBtnContainer">\n <a href="/Corporation/New" data-ajax="true" data_ajax_method="GET" data_ajax_mode="replace" data-ajax-update="';ajax-content" class="k-pager-refresh k-link k-button " style="float:left" title="Add New"><span>Add New</span></a>
</div>
;$kendoOutput+=;}return $kendoOutput;'
at Object.compile (kendo.all.min.js:25)
at Object.d [as template] (jquery.min.js:2)
at HTMLDocument.<anonymous> (Corporation:252)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Function.ready (jquery.min.js:2)
at HTMLDocument.K (jquery.min.js:2)
hello.
when i update window with
$(window).resize(function(){
$("#chart").data("kendoChart").refresh();
});
my is fall and need reload window
Hello,
I am trying to put an upload in a grid's editor so i can add a profile picture to my users. However, when the save action is called i always receive a null object. I am using an EditorTemplate to put the upload control in the grid's edit mode.
I suspect that the reason it does not work has something to do with the Editortemplate since if i copy my upload control in my main view, it sends the files to the controller properly.
here are the relevant code snippets:
Controller
[HttpPost]
public ActionResult Save(IFormFile files)
{
//Do save
return Content("");
}
Editortemplate
@model string
@(Html.Kendo().Upload()
.Name("files")
.Multiple(false)
.Async(a => a
.Save("Save", "File")
.AutoUpload(true)
)
)
The grid Column
columns.Bound(c => c.ProfilePicture).Title("Photo").EditorTemplateName("FileUpload").ClientTemplate("<img src='" + Url.Action("GetImage", "File") + "?imageID=#= ProfilePicture.ID #' alt='Profil' height='172' width='147'>").Width(160);
Hi, I think this is a bug.
This menu item will not work:
<
menu-item
text
=
"Search1"
asp-action
=
"search"
asp-controller
=
"Client"
link-html-attributes
=
'new { data_attr = "custom value" }'
></
menu-item
>
This menu item will work:
<
menu-item
text
=
"Search"
asp-action
=
"_search"
asp-controller
=
"Client"
link-html-attributes
=
'new { data_attr = "custom value" }'
></
menu-item
>
The only difference is the underscore. The underscore can be anywhere in the action name, but if it's not there, Telerik won't build the link with the action.
Are my actions required to have underscores?
When using DateInputFor on a required nullable datetime it allows submit when date is blank. It should throw a field required error like DatePicketFor. Same error if you use DatePickerFor(...).DateInput().
using System;
using System.ComponentModel.DataAnnotations;
public class TestViewModel {
[Required]
[DataType(DataType.Date)]
public DateTime? TheDate { get;set;}
[Required]
[DataType(DataType.Date)]
public DateTime? TheDate2 { get; set; }
}
}
@model TestViewModel
<
form
asp-action
=
"Index"
method
=
"post"
>
<
script
type
=
"text/javascript"
>
$.validator.setDefaults({
ignore: ""
});
</
script
>
<
p
>
@(Html.Kendo().DatePickerFor(m => m.TheDate))
<
span
asp-validation-for
=
"TheDate"
class
=
"text-danger"
></
span
>
</
p
>
<
p
>
@(Html.Kendo().DateInputFor(m => m.TheDate2))
<
span
asp-validation-for
=
"TheDate2"
class
=
"text-danger"
></
span
>
</
p
>
<
input
type
=
"submit"
value
=
"Go"
/>
</
form
>
Hello, in my grid I stored the DateTime as a short date string (Format: "month/day/year") and of course, it is sorting improperly. I looked up other solutions and they are for other platforms. From what I've seen you guys have a javascript library where it will properly sort the column. What is that javascript and how do I specify the correct column that needs to be sorted like a date? Do I also need to specify what format it is in? This is my code:
I want to sort c.ReceivedDate as a date.
@(Html.Kendo().Grid<ViewModels.RecentReceiptsViewModel>()
.Name(
"RecentReceiptsGrid"
)
.Columns(columns =>
{
columns.Bound(c => c.PoNumber).Title(
"Po#"
).Width(100);
columns.Bound(c => c.ReceivedDate).Title(
"Date"
).Width(100);
columns.Bound(c => c.ItemName).Title(
"Item"
).Width(100);
columns.Bound(c => c.Dimensions).Width(100);
columns.Bound(c => c.Cost).Width(100);
columns.Bound(c => c.Quantity).Width(100);
columns.Bound(c => c.Total).Width(100);
})
.Scrollable()
.Groupable()
.Sortable()
.DataSource(
dataSource => dataSource.Ajax()
.Read(read => read.Action(
"ReadRecentReceiptsReport"
,
"Reports"
)))