Hi,
I am experiencing an odd behavior when using the .NoRecords() function of the grid. If I add .NoRecords() the height of the grid auto sizes to an extreme height beyond the view screen height when there are no records. If there are records, then the grid auto sizes appropriately. If I remove .NoRecords() then the grid is collapsed to a reasonable height when no records are available. I have not had this issue with previous versions. Using Developer Tools for the browsers I cannot see any .css file that is applying any height value that would be causing this issue. Is this a known issue, working as intended or am I missing something?
I am using version 2020.2.513.
Thanks.
@(Html.Kendo().Grid<ViewModel>(Model)<br>
.Name(
"UserGrid"
)<br>
.Columns(columns =><br>
{
columns.Bound(p => p.Name);
columns.Bound(p => p.Status);
columns.Bound(p => p.Id);<br> })<br> .Pageable(pager => pager.PageSizes(
new
[] { 10, 20, 50, 100 }))<br> .Sortable(sortable => sortable<br> .AllowUnsort(
true
)<br> .SortMode(GridSortMode.MultipleColumn)<br> .ShowIndexes(
true
))<br> .Filterable()<br> )
How do I refer to a model property value in the template? I have:
<
div
class
=
"k-content"
>
@(Html.Kendo().ListView<
MemberSkillModel
>()
.Name("listViewSkills")
.TagName("div")
.ClientTemplateId("skillstemplate")
.BindTo(@Model.MemberSkills)
)
</
div
>
and
<
script
type
=
"text/x-kendo-tmpl"
id
=
"skillstemplate"
>
<
div
class
=
"k-widget"
style
=
"border:0px"
>
<
div
class
=
"row"
>
<
div
class
=
"col-12"
>
#:Name#
@if (@Model.MemberSkills.ExpiryDate != null)
{
@:(exp kendo.toString(ExpiryDate, "MMMM dd, yyyy")#)
}
</
div
>
</
div
>
</
div
>
</
script
>
Obviously @Model.MemberSkills.ExpiryDate throws an error as it needs a model item instead of the entire model contents.
Hi, My kendo inline grid is not calling the update method in controller, when any of its fields is autopopulated dynamically.
I am not manually editing any of the fields in the particular row, instead the fields are getting automatically populated. And on update click I need to do validation in server controller method .But unfortunately the control is not going to the server method on update button click.
Can someone help me to resolve this,
Hello,
I'm using ASP.NET Core 2.1 and trying to get a Pie chart bound to a remote datasource based on this example: https://demos.telerik.com/aspnet-core/pie-charts/remote-data-binding. I can't get anything except the "Title" to show. The pie never displays. (FYI, the pie chart works fine for hardcoded data.) I know the controller works as I'm getting response data in the format I expect. Here's some streamlined code:
Here's my view:
@(Html.Kendo().Chart<WT.Models.Cars>()
.Name("chart1")
.Title(title => title.Text("Title").Position(ChartTitlePosition.Top))
.DataSource(ds => ds.Read("CarTotals_PieChart", "Output"))
.Series(series => series.Pie(model => model.NumCars, model => model.CarManu))
)
Here's my model:
public class Cars
{
public string CarManu{ get; set; }
public int NumCars { get; set; }
}
Here's my response JSON data:
{"Data":[{"CarManu":"GM","NumCars":167},{"CarManu":"Ford","NumCars":120},{"CarManu":"Mazda","NumCars":60},{"CarManu":"Ferrari","NumCars":19}],"Total":4,"AggregateResults":null,"Errors":null}
I've seen other posts related to this exact same (issue but never a resolution. What am I doing wrong? Thanks in advance.
Hello,
in a Telerik RadGrid (web) I need to merge some cell rows like the attached image,
and change the font color based on values in these cells.
Has anyone idea how to make this?
Thanks a lot.
Luis
I'm using Asp.net core razor pages with custom column settings. The client wants to block users from navigating off the page when there is a row in edit mode. Is there a suggested way to do this that doesn't involve jquery? Every example I've found so far is under jquery. Ideally, the client should be told with some kind of message the reason for preventing page close.
Hello,
I have a grid with custom template column and with event handler for grid change event (I have omitted not important parts of code):
@(Html.Kendo().Grid<OpportunityTool.Models.AccountForGrid>()
.Name("AccountGrid")
.Columns(columns =>
{
// other columns definitions - not important here
columns.Bound(p => p.SlaveAccount.Owneridname).Title("VlastnÃk")
.ClientTemplate("<div class='contact-presenter'>#=SlaveAccount.Owneridname#</div>");
})
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single))
.Events(events => events
.Change("AccountGridChange"))
)
I have assigned event handler for click on my custom column too:
$('#AccountGrid').on('click', '.contact-presenter', showContactDetail);
I want to prevent the selection of the whole row, when user clicks on my custom column. I don't know how to do it, because change event is fired before cell click event.
Is there a way to change the order of the events?
Thanks for help,
Boris.
I am unable to replicate this demo on page/data load. With data that is already checked the parent gets put into an indeterminate state if any of its children are checked.
The indeterminate state only appears if the user manually clicks one of the children check boxes.
https://dojo.telerik.com/ebAVASUp - here February is checked and its parent is in an indeterminate state on data/page load
My Code
<kendo-treeview name=
"DataRestrictionTree"
load-on-demand=
"false"
template=
"#=TreeViewTemplateSet(item.PathDescription,item.ModifiedBy,item.ModifiedDate,item.checked)#"
>
<checkboxes check-children=
"true"
/>
<!--Batch attribute
in
hierachical datasource
is
needed so any change causes an update-->
<hierarchical-datasource type=
"Kendo.Mvc.UI.DataSourceTagHelperType.Ajax"
server-filtering=
"true"
server-sorting=
"true"
page-size=
"0"
batch=
"true"
on-request-end=
"RequestEnd"
>
<transport>
<read url=
"@Url.Action("
GetDataRestrictionAssignments
", "
DataRestrictionAssignment
")"
datatype=
"json"
data=
"DataAssignmentFilter"
/>
<update url=
"@Url.Action("
UpdateDateRestrictions
", "
DataRestrictionAssignment
")"
datatype=
"json"
/>
</transport>
<schema>
<hierarchical-model id=
"PrimaryId"
children=
"HasChildren"
></hierarchical-model>
</schema>
</hierarchical-datasource>
</kendo-treeview>