Hello,
we use Kendo Ui for ANgualr 2 grid with sorting. Out of the box the column with sorting enabled can be in 3 possible states: sorted asc, sorted desc or not sorted. chages in grid sorting update boutd sort property wit current array of SortDescriptors. When column is sorted SortDescriptor is added to array of Sortdescriptors and specifies the field and direction of sort.
If column is not sorted it should not be present in SortDescriptor array. However if column is clicked until it is unsorted again, its SortDesriptor stays in array with direction 'undefined'. This is incorrect, it should disappear from array. Also according to Kendo type definition direction can only have value 'asc' or 'desc' but not 'undefined'
Hello, I hope someone can help me out with this problem I am struggling with.
I am attempting to use a multi select as an editor for a column within my grid. This column itself is actually an object which I use a template to display the text content within the grid:
"accountReps"
: {
"primary"
: [{
"userId"
: 1234,
"name"
:
"Person name"
}],
"secondary"
: []
}
These properties are also both set as editable in the schema model
"accountReps.primary"
: {
"type"
:
"object"
,
"editable"
:
true
,
"nullable"
:
false
,
"validation"
: {
"required"
:
false
}
},
"accountReps.secondary"
: {
"type"
:
"object"
,
"editable"
:
true
,
"nullable"
:
false
,
"validation"
: {
"required"
:
false
}
}
When its comes to the editor I can display the editor and populate the initial values fine, but when persisting back to the grid the data is not to be mapping to my object correctly. The code I am using for the editor is:
$(
'<select name="'
+ options.field +
'"/>'
)
.appendTo(container)
.kendoMultiSelect({
placeholder:
"Select"
,
autoBind:
false
,
dataTextField:
"Name"
,
dataValueField:
"Id"
,
valuePrimitive:
true
,
dataSource: ds,
change:
function
(e) {
console.log(
'change'
);
},
select:
function
(e) {
console.log(
'select'
);
},
dataBound:
function
() {
var
fieldValues = options.model.get(options.field).map(
function
(item) {
return
item.userId.toString();
});
this
.value(fieldValues);
}
});
I believe its just setting the selected ids as the value for my column. I'm hoping for an event I can use to set the value correctly or a way to map the object.
Any help would be much appreciated.
John
I have a need to do the following two things with my grid's column filter menu dropdown checkboxes:
1) Sort the checkboxes alphabetically by their value (by default the are sorted by the grid's datasource sort value).
2) Filter all other column's checkbox values based on the filter selection of the first checkbox.
I found examples on here which show how to do each of these things, but when combined together I'm noticing that, because the grid and the filter menu share the same datasource, as soon as the filter menu is opened and the checkboxes are sorted/displayed, the entire grid is sorted as well.
I've created an example here: http://dojo.telerik.com/@mcook103/oxilA
Hello Everyone,
I want to apply the group property to only week view and keep it default for day and month. How can I that?
Thanks
Rahul
Hi Teachers
I am using Kendoui in asp.net core for reporting for pdf and excel.Report pdf have problem for motherland language not display in export file .pdf.I am add pdf export code of index.chtml file look like this
<h2>PDF Report Kendo UI Layout Tutorials</h2>
<style>
/*
Use the DejaVu Sans font for display and embedding in the PDF file.
The standard PDF fonts have no support for Unicode characters.
The font-face is declared in the Kendo UI stylesheets.
*/
@@font-face {
font-family: "MyanmarLanguage";
src: url("~/Fonts/Zawgyi-One.ttf") format("truetype");
}
.k-grid {
/*font-family: "DejaVu Sans", "Arial", ''sans-serif'';*/
font-family: ''MyanmarLanguage'';
}
/* Hide the Grid header and pager during export */
.k-pdf-export .k-grid-toolbar,
.k-pdf-export .k-pager-wrap {
display: none;
}
</style>
<div class="box wide">
<p style="margin-bottom: 1em"><b>Important:</b></p>
<p style="margin-bottom: 1em">
This page loads
<a href="https://github.com/nodeca/pako">pako zlib library</a> (pako_deflate.min.js)
to enable compression in the PDF. This is highly recommended as it improves
performance and rises the limit on the size of the content that can be exported.
</p>
<p>
The Standard PDF fonts do not include Unicode support.
In order for the output to match what you see in the browser
you must provide source files for TrueType fonts for embedding.
Please read the documentation about
<a href="http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#custom-fonts-and-pdf">custom fonts</a>
and
<a href="http://docs.telerik.com/kendo-ui/framework/drawing/pdf-output#using-custom-fonts">drawing</a>.
</p>
</div>
<script type="x/kendo-template" id="page-template">
<div class="page-template">
<div class="header">
<div style="float: right">Page #: pageNum # of #: totalPages #</div>
Multi-page grid with automatic page breaking
</div>
<div class="watermark">ပá€á€¯á€„္စá€á€¯á€¸á€žá€°</div>
<div class="footer">
Page #: pageNum # of #: totalPages #
</div>
</div>
</script>
<div>
@(Html.Kendo().Grid<EPGEKendoUI.Models.TestViewModel>()
.Name("grid")
.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf
.AllPages()
.AvoidLinks()
.PaperSize("A4")
.Margin("2cm", "1cm", "1cm", "1cm")
.Landscape()
.RepeatHeaders()
.TemplateId("page-template")
.FileName("Kendo UI Grid Export.pdf")
.ProxyURL(Url.Action("ExcelSave", "Grid"))
)
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.ForeignKey(p => p.GenreId, (System.Collections.IEnumerable)ViewData["genres"], "Id", "Name").Title("Genre");
columns.ForeignKey(p => p.RatingId, (System.Collections.IEnumerable)ViewData["ratings"], "Id", "Name").Title("Rating");
columns.ForeignKey(p => p.ShopLocationId, (System.Collections.IEnumerable)ViewData["location"], "Id", "Location").Title("ShopLocation");
})
.HtmlAttributes(new { style = "height: 550px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("ExcelRead", "Excel"))
.PageSize(20)
)
)
</div>
<style>
/* Page Template for the exported PDF */
.page-template {
/*font-family: "DejaVu Sans", "Arial", sans-serif;*/
font-family : ''MyanmarLanguage'';
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.page-template .header {
position: absolute;
top: 30px;
left: 30px;
right: 30px;
border-bottom: 1px solid #888;
color: #888;
}
.page-template .footer {
position: absolute;
bottom: 30px;
left: 30px;
right: 30px;
border-top: 1px solid #888;
text-align: center;
color: #888;
}
.page-template .watermark {
font-weight: bold;
font-size: 400%;
text-align: center;
margin-top: 30%;
color: #ff0000;
opacity: 0.1;
transform: rotate(-35deg) scale(1.7, 1.5);
}
/* Content styling */
.customer-photo {
display: inline-block;
width: 32px;
height: 32px;
border-radius: 50%;
background-size: 32px 35px;
background-position: center center;
vertical-align: middle;
line-height: 32px;
box-shadow: inset 0 0 1px #999, inset 0 0 10px rgba(0,0,0,.2);
margin-left: 5px;
}
.customer-name {
display: inline-block;
vertical-align: middle;
line-height: 32px;
padding-left: 3px;
}
</style>
Pleas help me and see out put pdf file attached.
I'm not sure if this is a recent issue, or if it's always been there, I'd swear it was working before but maybe I'm mistaken.
If this is a known issue please disregard.
In Excel or Google sheets, if you make a rectangular selection of a range, you can edit a value, hit the TAB key, edit the next value, and the selection within the selection will move within your rectangle, allowing you to edit each cell in the range.
Currently, in the Kendo UI spreadsheet, for some reason, if you enter a value for one cell, it makes that value the value for ALL cells in the selection.
Steps to reproduce:
The issue:
Unlike Excel or Google Sheets, and this seems problematic, editing a single cell within a multi-cell range causes all cells to change to that value, rather than allowing individual cell editing via the TAB and ENTER keys.
Cross posting from dropdownlist widget.
Both widgets(potentially others) seem to have the same issue in MS Edge. Their popup will appear, then immediately disappear.
It looks like combobox has the same issue as the other widgets.