My dialog has no buttons... Well not really, they're there but they're white. White button, white text... They don;t show up until I hover over one of them. What styles or classes do I need to edit to get my dialog buttons to show up?
Hello,
If I use kendoValidator in a grid Editor template the error is shown in a tooltip over the field - if I use
a "normal" view the kendoValidator error is shown under the field (see attached Pictures)
robert

How to reproduce.
Have a Grid setup,
Use Template like this.
.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("Example"))
Inside Example TemplateGet something like this to the bottom of the page other than your normal input:
<script> $(document).ready(function () { setTimeout(function () { // comments that will cause problem if ($("#hideClassId").val() > 0) { $("#tClassId").hide(); $("#tClass").show(); } }); }); // comments that can cause problem $("input#IsActive").on('change', function () { $('#ActiveWaiting').prop('checked', false); }); // comments that can cause problem $('#ActiveWaiting').on('change', function () { $("input#IsActive").prop('checked', false); });</script>
Then the popup would freeze.This is what the error would look like in the console.Uncaught SyntaxError: Unexpected end of input at eval (<anonymous>) at Function.globalEval (https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js:2:2662) at Ha (https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js:3:21262) at n.fn.init.append (https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js:3:22791) at M.fn.init.n.fn.(anonymous function) [as appendTo] (https://kendo.cdn.telerik.com/2017.1.223/js/jquery.min.js:3:24510) at init._createPopupEditor (https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js:49:21766) at init.editRow (https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js:49:19002) at init.addRow (https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js:49:26820) at HTMLAnchorElement.<anonymous> (https://kendo.cdn.telerik.com/2017.1.223/js/kendo.all.min.js:49:27635)
I have table in database which contains events of a system and these events have severity code and event code. These codes have to be localized, it means the text for the severity and event codes should be taken from resource files.
Here is how we construct data for the grid:
public ActionResult GetEvents([DataSourceRequest] DataSourceRequest request){ IQueryable<SystemEventGridModel> data = SystemEvent.GetSystemEventFromDatabase().Select(systemEvent => new SystemEventGridModel { Id = systemEvent.Id, EventCode = systemEvent.EventCode, SeverityCode = systemEvent.SeverityCode, Date = systemEvent.Date, Node = systemEvent.Node, IsActive = systemEvent.IsActive }); DataSourceResult dataSourceResult = data.ToDataSourceResult(request); foreach (SystemEventGridModel gridModel in dataSourceResult.Data) { gridModel.EventText = Language.ResourceManager.GetString($"EventText{gridModel.EventCode}"); gridModel.SeverityText = Language.ResourceManager.GetString($"SeverityText{gridModel.SeverityCode}"); } return Json(dataSourceResult);}
Then in the grid we show the localized text but not the codes:
@(Html.Kendo().Grid<SystemEventGridModel>() .Name("SystemEventGrid") .Columns(columns => { columns.Bound(x => x.Node).Title(Language.SystemEventGridModelTitleNode); columns.Bound(x => x.SeverityCode).Title(Language.SystemEventGridModelTitleSeverityText).ClientTemplate("#=SeverityText#").Filterable(x => x.Multi(true).CheckAll(false).ItemTemplate("function(e){return columnFirtalableItemTemplate('SeverityCode', 'SeverityText')}")); columns.Bound(x => x.EventCode).Title(Language.SystemEventGridModelTitleEventText).ClientTemplate("#=EventText#"); columns.Bound(x => x.Date).Title(Language.SystemEventGridModelTitleDate); columns.Bound(x => x.IsActive).Title(Language.SystemEventGridModelTitleIsActive); }) .DataSource(binding => binding.Ajax().Read("GetEvents", "Home", null)) .Sortable() .Filterable() .Pageable(x => x.Refresh(true)))
The problem is that we can't use the standard filtering for the columns (e.g. EventText) which do not existing in database and are taken from different places:
Is there a way to apply the filtering for the text and search by code from database?
P.S. I attached only the source files (models, views and controllers) for the example code.
I have a kendo grid which is defined as below
$('#BrowseSchool').kendoGrid({ columns: [{ title: 'Name', headerAttributes: { "data-field": 'Name', "data-title": 'Name' }, field: 'Name', encoded: true }, { title: 'City', headerAttributes: { "data-field": 'City', "data-title": 'City' }, field: 'City', encoded: true }, { title: 'State', headerAttributes: { "data-field": 'State', "data-title": 'State' }, field: 'State', encoded: true }, { title: 'Zip', headerAttributes: { "data-field": 'Zip', "data-title": 'Zip' }, field: 'Zip', encoded: true }], pageable: { buttonCount: 10 }, sortable: true, selectable: 'Single, Row', filterable: true, scrollable: { height: '200px' }, messages: { noRecords: 'No records available.' }, dataSource: { type: (function() { if (kendo.data.transports['aspnetmvc-ajax']) { return 'aspnetmvc-ajax'; } else { throw new Error('The kendo.aspnetmvc.min.js script is not included.'); } })(), transport: { read: { url: '/Student/Student_Read' }, prefix: '' }, pageSize: 10, page: 1, total: 0, serverPaging: true, serverSorting: true, serverFiltering: true, serverGrouping: true, serverAggregates: true, filter: [], schema: { data: 'Data', total: 'Total', errors: 'Errors', model: { fields: { Address1: { type: 'string' }, Name: { type: 'string' }, City: { type: 'string' }, State: { type: 'string' }, Zip: { type: 'string' } } } } } }});
I have a div tag defined as below in my view, where the grid is loaded.
<div id="BrowseSchool" class="browse"></div>
Now I want that if there are no records returned by the Kendo grid when a filter is applied, I want to hide my div inside which kendo grid loads and show a different div.
I have tried adding databound event to my grid like below:
databound: function (e) { alert("No Data"); //var grid = $("#BrowseSchool").data("kendoGrid"); //if (grid.dataSource.total() == 0) { // alert("No Data"); // $("#BrowseSchool").hide(); //}},
But, this doesn't seem to be working, as I didn't get the alert box.
My question is, how can I hide a div if there are no records returned by the kendo grid when a filter is applied?
Thanks in advance!

Is there any classes I can add to a button to change the styling similar to bootstrap's "btn-danger"?
For buttons that do potentially dangerous things, I would like to add special styling to them but not have to worry about if the text color will be correct. Currently there is the "Primary" attribute, but it'd be great if there were other categories.
I understand adding features like that isn't easy to do quickly, but if there are any classes I can add to a normal kendo button to change color and style that's be great!

Hi All,
I need to display the filter criteria used by a user for a kendoUI grid. Is there any built in way to display this info?
If not, how can I access the those values (like value in search textbox, greater than, less than condition values etc).

Hi Telerik Team,
I am having telerik MVC kendo grid(server side grid), In the grid I have defined databinding event. In databinding I want to call web api and alter grid's underline items based on that, and want grid to take updated items and display in grid. mainly want grid to wait for ajax complete before invoking it's databound event. plz share how to achieve that.
Please find the code snippet below,
@(Html.Kendo().Grid<Model>()
.Name("grdResults")
.Columns(columns =>
{
columns.Bound(e => e.Title).Title("Title").Width(300);
columns.Bound(e => e.resources).Encoded(false).Width(100).Title("Resource").Sortable(false);
})
.Scrollable()
.DataSource(dataSource => dataSource
.Custom()
.Schema(sch =>
{
sch.Model(m =>
{
m.Id("field1");
m.Field(f => f.field1).Editable(false);
});
})
.Type("odata-v4")
.Transport(transport =>
{
transport.Read(read => read.Url(odataurl)
.DataType("json")
);
})
.PageSize(10)
.ServerPaging(true)
.ServerSorting(true)
//.ServerFiltering(true)
)
.Sortable()
.Pageable()
.Events(e => e.DataBinding("onDataBinding"))
)
<script>
function onDataBinding(arg) {
//Making ajax call here and and changing the arg.items value for a particular column,but value is not getting updated in the grid
Note: I am able to update the grid column value when I make async: false in ajax call
}
</script>
Thanks,
Prathibha