Hello,
I want to create a html helper for grid in asp.net core application using code from this example Define a custom Html.Kendo extension helper.
But HtmlHelper class not found. What am I doing wrong?
Is it possible to create multilevel Pie / Donut Chart with the chart component?
I have included an example of what I mean. The point is that the outer ring shows sub categories of categories in the inner ring.
Kind Regards
Erwin
Hi,
I am trying to apply filter to a grid from server-side. Below is the implementation.
public static AjaxDataSourceBuilder<T> Configure<T>(this AjaxDataSourceBuilder<T> source, UserGridPreferenceVM userPreferences) where T : class{ if (userPreferences.Filter?.Filters != null && userPreferences.Filter.Filters.Length > 0) { List<FilterDescriptor> filters = new List<FilterDescriptor>(); foreach (FilterElement filter in userPreferences.Filter.Filters) { filters.Add(new FilterDescriptor(filter.Field, GetFilterOperator(filter.Operator), filter.Value)); } source.Filter(s => { s.AddRange(filters); }); } return source;}
I have 2 questions.
1. When the grid loads the filter condition is set but value of the filter is not set.
2. How we can apply Logic operator "And"/"Or" to the filter wrt above code snippet?
Thanks in advance.
@(Html.Kendo().PDFViewer() .Name("pdfviewer") .PdfjsProcessing(pdf => pdf .File(Url.Content("https://localhost:44335/test.pdf")) ) )
Hi, i have a chart see attached image.
1. How can i hide the "Total" label from the Legend and the corresponding column?
2. Sorting doesn't seem to work
Here's
@(Html.Kendo().Chart<UpdateLine>() .Name("chart") .Title("API Calls") .Legend(legend => legend .Position(ChartLegendPosition.Top) ) .SeriesDefaults(defaults => defaults .Column() .Visual("chartVisual") ) .Series(series => { series.Column(model => model.Count).Name("#= group.value #").CategoryField("Date"); series.Line(model => model.Total, x => x.Date) .Color(Colours.Orange) .VisibleInLegend(false) .Axis("Total"); }) .SeriesColors(Colours.Blue, Colours.Orange, Colours.Grey, Colours.Yellow, Colours.LightBlue, Colours.Green) .ValueAxis(axis => axis.Numeric() .Labels(l => l.Format("{0:N0}")) ) .CategoryAxis(axis => axis .Date() .Name("DateAxis") //.Min(1) .Labels(labels => labels.Format("dd MMM")) ) .ValueAxis(axis => axis .Numeric() .Name("Total") .Title("Total Calls") .Color(Colours.Orange) ) .Tooltip(tooltip => tooltip .Visible(true) .Format("{0:N}") .Template("#= series.name #: #= kendo.format('{0:N0}', value) #") ) .Events(events => events. DataBound("onDataBound") ) .DataSource(dataSource => dataSource .Read(read => read.Action("Chart", "Updates")) .Group(group => group.Add(model => model.Zone)) .Sort(sort => sort.Add(model => model.Date).Descending()) ))I need to create custom editor for employee leave requests. I know how to create custom template but I am not sure how to change that title in title bar. I want it to be name of the employee since it is not event but rather leave request in my case.
Hi Progress,
Im trying to make an grid view that uses an edit button. My goal is for the user to be taken to another page (an edit page) when pressing that button. I do not want inline editing of that item. Since i found the tag helpers very useful and readable, making it easier for other developers to read them, i im currently looking to make an navigation between edit button and passing an value to an View where Customer is supposed to edit the chosen item.
Iv'e tried the following without any luck:
actionlink through using your taghelpers.
<update url="@Url.Action("Edit", "VehicleHome", *What do i post here* )"type="PATCH" />
<commands>
<column-command text="Edit" name="edit">/*What do i post here*/</column-command>
</commands>
However i do not know how to pass an value of the item i want to edit through taghelpers.
My grid looks as followed.
<kendo-grid name="VehicleHome" height="550">
<columns>
<column field="Id" title="ID">
<filterable enabled="false"></filterable>
</column>
<column field="Name" title="Namn" />
<column field="Street" title="Gata" />
<column field="PostalCode" title="Postnummer" />
<column>
<commands>
<column-command text="Edit" name="edit"></column-command>
</commands>
</column>
</columns>
<scrollable enabled="true" />
<sortable enabled="true" />
<pageable enabled="true" />
<filterable enabled="true" />
<pageable button-count="5" refresh="true" page-sizes="new int[] { 5, 10, 20, 50}"></pageable>
<datasource type="DataSourceTagHelperType.Ajax" page-size="20">
<transport>
<read url="@Url.Action("Get_VehicleHomes", "Grid")" type="GET" />
<update url="@Url.Action("Edit", "VehicleHome", 1 )"type="PATCH" />
</transport>
</datasource>
</kendo-grid>
Thank you!
Hi!
When I load an Excel-File from disk to show it inside Spreadsheet component the font families are not taken into account. For example, I formatted a cell with Arial Black, but it only shows Arial. How can I ensure that the fonts are included in the import?
Regards
Heiko
Ok, I've got a grid like so-
@(Html.Kendo().Grid<Honovi.ACT.MVCCore.Models.Bond>()
.Name( "GridBond" )
.Columns( columns =>
{
//columns.Bound ( p => p.BondBotyNumber ).ClientTemplate ( " #= BondBotyNumberNavigation ? BondBotyNumberNavigation.BotyDesc : '' # " ).Title ( "Type" ); // works for edit but clicking add button fails
//columns.Bound (p => p.BondBodyNumber.BodyDesc) // works for edit but clicking add button fails
columns.Bound( p => p.BondBotyNumber ); works, but I want display the description here
// Bunch of other columns
columns.Command( command => { command.Edit(); command.Destroy(); } ).Width( 172 );
} )
.ToolBar( toolbar => toolbar.Create() )
.Editable( editable => editable.Mode( GridEditMode.PopUp ).TemplateName( "_Bond" ).Window( w =>
w.Title( "\uD83D\uDD89 Manage Bonds" )
.Name( "winRate" )
.Width( 560 )
) )
.Selectable( selectable => selectable.Mode( GridSelectionMode.Single ) )
.Pageable()
.Sortable()
.DataSource( dataSource => dataSource
.Ajax()
.PageSize( 10 )
.Model( model => model.Id( p => p.BondGuid ) )
.Events( events => events.Error( "error_handler" ) )
.ServerOperation( false )
.Read( read => read.Action( "Bonds_Grid_Read", "Bonds", new { corpGuid = Model.CorpGuid } ) )
.Update( update => update.Action( "Bonds_Grid_Update", "Bonds" ) )
.Create( update => update.Action( "Bonds_Grid_Create", "Bonds", new { corpGuid = Model.CorpGuid } ) )
.Destroy( update => update.Action( "Bonds_Grid_Destroy", "Bonds" ) )
)
)
The problem I'm having is with the column. It is a navigation property on my model that is a foreign key that relates back to another model that is just an int / string that is used for a drop down. On the grid the edit button works fine. But when I click the add button nothing happens and I get the following js error in the console-
ReferenceError: BondBotyNumberNavigation is not defined[Learn More] kendo.all.min.js%20line%2025%20%3E%20Function:3:66
If I comment out the offending navigation property and just use the int value (as above) the add button works and I get no error.
Note I'm using with EditMode.Popup if that matters. Also I can post model code and such but it is pretty vanilla so I'm thinking I'm missing something more basic.
A little help! Thanks.
