The ListViewTag class serialises the entire data object, even if those fields aren't used in the ListView. I'm using a Hibernate entity which uses a list of objects from a many-to-many relationship and I only want to retrieve these when I need them. When the Serializer class tries to serialise the object then Hibernate tries to populate the list but it can't because there is no database session open.
Is there any way fields can be ignored by the com.kendoui.taglib.json.Serializer?
See stack trace:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.syngenta.combichem.model.CcwEnumeration.buildingBlocks, could not initialize proxy - no Session org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:575) org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:214) org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:554) org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:142) org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:180) com.kendoui.taglib.json.Serializer.serializeIterable(Serializer.java:171) com.kendoui.taglib.json.Serializer.serialize(Serializer.java:109) com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158) com.kendoui.taglib.json.Serializer.serialize(Serializer.java:121) com.kendoui.taglib.json.Serializer.serializeIterable(Serializer.java:174) com.kendoui.taglib.json.Serializer.serialize(Serializer.java:109) com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158) com.kendoui.taglib.json.Serializer.serialize(Serializer.java:113) com.kendoui.taglib.json.Serializer.serializeMap(Serializer.java:158) com.kendoui.taglib.json.Serializer.serialize(Serializer.java:111) com.kendoui.taglib.WidgetTag.script(WidgetTag.java:101) com.kendoui.taglib.WidgetTag.doEndTag(WidgetTag.java:61) com.kendoui.taglib.ListViewTag.doEndTag(ListViewTag.java:82)Dear,
I am building dynamic scatter line & dot chart from database with dynamic numbers of chart series. When i tried pre-configure chart series it working fine.
Class representation.
public class GraphSeriesPoint { public GraphSeriesPoint(double X, double Y, string Tooltip) { this.PointValueX = X; this.PointValueY = Y; this.PointTooltip = Tooltip; } public double PointValueX { get; set; }<br> public double PointValueY { get; set; }<br> public string PointTooltip { get; set; }<br> }<br> public class GraphSeries<br> {<br> public int SeriesID { get; set; }<br> public string SeriesName { get; set; }<br> public string SeriesColor { get; set; }<br> public string SeriesDashType { get; set; }<br><br> public List<GraphSeriesPoint> Points {get;set;}<br> }<br> public class GraphData<br> {<br> public int GraphID { get; set; }<br> public string GraphTitle { get; set; }<br> public string OperatingWindow { get; set; }<br> public string OperatingEnvelop { get; set; }<br> public string DesignEnvelop { get; set; }<br><br><br> public string XTitle { get; set; }<br> public double XMin { get; set; }<br> public double XMax { get; set; }<br><br><br> public string YTitle { get; set; }<br> public double YMin { get; set; }<br> public double YMax { get; set; }<br><br> public List<GraphSeries> Lines { get; set; }<br> }
I am trying to load the grid state from the json that is saved when saving grid state. I am using `JSON.parse(text)` text being my json. The actual code works everywhere else but the unexpected token # in json is causing issues.
This is the specific area that is causing the issue
columns.Template(@<text> </text>) .Title("Actions") .ClientTemplate( "<a href='" + @Url.Action("EditTime", "TimePunches", new { id = "#=ID#", flt = @ViewBag.FLT }) + "' title='Edit'><i class='icon-edit fa fa-pencil fa-fw fa-lg'></i></a>" + "<a href='" + @Url.Action("PunchLogIndex", "TimePunches", new {id = "#=ID#", flt = @ViewBag.FLT}) +"' title='Punch Log'><i class='icon-purple fa fa-book fa-fw fa-lg'></i></a>" + "<a href='" + @Url.Action("PunchRequestIndex", "TimePunches", new { punchId = "#=ID#", flt = ViewBag.FLT }) + "' title='See Change Request Log'><i class='icon-niagara fa fa-list fa-fw fa-lg'></i></a>" + "<a href='\\#' id='delete' data-id='#=ID#' data-client='#=ClientID#'><i class='icon-red fa fa-times fa-fw fa-lg'></i></a>").Width(150).HeaderHtmlAttributes(new { @class = "header-center" });
It's my understanding that the razor text attributes are not liked when loading grid state. Is there a way to load this template in after the fact?

I am having trouble with some Site CSS box-sizing interfering with the Kendo DatePicker.
The problem is some standard CSS is globally applied to all text inputs with the following CSS:
input[type="text"], input[type="password"] { border-color: #cdcdcd; border-style: solid; border-radius: 3px; border-width: 1px; border-radius: 3px; height: 32px; padding: 8px 8px 8px 8px; box-sizing: border-box; /* Remove this, date picker displays ok but text box too big */ }This causes a grey line to appear at the bottom of the DatePicker which I want to get rid off. The problem seems to stem from the box-sizing css property above. Remove this, the grey area is removed. However, the text input appears too big.
I have prepared a Dojo example for this:
http://dojo.telerik.com/@andez2000/eHEZA/17
Any help is appreciated
We are migrating our application from the ASP.NET AJAX Grid, where we had the PageCount in the Pager-Message as stated here:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/paging/changing-the-default-pager/using-pagertextformat
{1} is total number of pages.
Unfortunately, the Pager of the Kendo Grid does not support the PageCount.
http://docs.telerik.com/kendo-ui/api/javascript/ui/pager#configuration-messages.display
Is there any workaround to get the pageCount in the pager?
i'm new with kendo-ui and mvc.
how can i implement a parent-child structure in kendo-grid with expand/collapse behavior?
we are currently using kendo-ui 2013.
hoping for your kind help.
thank you in advance.
hi,
I am opening an kendo window using the below jquery function.
However I need to pass __RequestVerificationToken to the MVC Controller because I am having "ValidateAntiForgeryToken" Attribute.
However, I am not able to pass it. Can you please suggest how to pass __RequestVerificationToken while opening an kendoWindow
function OpenTest() {
var url = '@Url.ActionWithArea("OpenTest", "Test", GlobalConst.AREA_EL_ElectiveEB)';
url += "?test=" +$("#test").val() +
"&test1=" +$("#test1").val();
windowElement = $('<div id = "abc" />').kendoWindow({
title: 'test',
content: url,
modal: true,
resizable: false,
draggable: false,
width: 900,
height: 400,
close: function () { windowElement.destroy(); }
}).data("kendoWindow").center().open();
return false;
}
I'm using the example from http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/custom-delete-confirmation-dialog. From what I can see, the code appears almost identical, but when I click the delete command the default javascript dialog is still shown then the kendo.confirm(). If I then disable the confirmation using confirmation: false in the editable {}, the default confirmation dialog is not shown, but the destroy event is triggered before the kendo.confirm(). Is there a reason why I'm still getting the default confirmation dialog?
I've attached a gif screen capture of what I am seeing when clicking the delete command button.
var ds_addresses = new kendo.data.DataSource({ autoSync: false, transport: { create: { url: url('common/ax_add_address'), dataType: "json", type: "post" }, read: { url: url('common/ax_read_addresses/' + item.user_id), dataType: "json", type: "post", contentType: "application/json" }, update: { url: url('common/ax_update_address/' + item.user_id), dataType: "json", type: "post" }, destroy: { url: url('common/ax_delete_address'), dataType: "json", type: "post" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, serverPaging: false, serverSorting: false, serverFiltering: false, pageSize: 10, schema: { model: { id: "address_id", fields: { text: { editable: true, validation: { required: true } }, suburb: { editable: true, validation: { required: true } }, postcode: { editable: true, validation: { required: true, max: 9020 } }, postal: { type: "boolean", editable: true } } }, data: "data", total: "total" }, error: function (e) { //kendo.alert(e.errors.join("; ")); }}); $("div.client-addresses").kendoGrid({ dataSource: ds_addresses, scrollable: false, selectable: "row", sortable: false, pageable: false, toolbar: ["create"], columns: [ { field: "address_id", hidden:true }, { field: "text", title: "Address Text" }, { field: "suburb", title: "Suburb", width: "200px" }, { field: "postcode", title: "Postcode", width: "80px" }, { field: "postal", title: "Postal?", width: "90px", template: "#= postal ? 'Yes' : 'No' #" }, { command: [ {name: "edit", text: " ", template: "<a class='k-button k-grid-edit' href='' style='min-width:16px;'><span class='k-icon k-edit'></span></a>" }, {name: "delete", text: " ", template: "<a class='k-button k-grid-delete' href='' style='min-width:16px;'><span class='k-icon k-delete'></span></a>", click: function(e) { e.preventDefault(); //prevent page scroll reset var tr = $(e.target).closest("tr"); //get the row for deletion var data = this.dataItem(tr); //get the row data so it can be referred later kendo.confirm("Are you sure you want to delete this address record?").then(function () { grid.dataSource.remove(data) //prepare a "destroy" request grid.dataSource.sync() //actually send the request (might be ommited if the autoSync option is enabled in the dataSource) }, function () { //kendo.alert("You chose to Cancel action."); }); }} ], title: "Action", width: "118px" } ], editable: { mode: "inline" }, change: function(e) { var rows = this.select(); if(rows.length > 0) $('#selected-controls').show(); else $('#selected-controls').hide(); }, noRecords: { template: '<div style="margin:20px">No address records present.</div>' }});In my code I am using the Diagram to show a series of options to a user, in a hierarchical format. The data source gets its info from a web call, and the visual template is simply a rectangle and some text. I create the diagram with the following options:
layout: {
type: "layered"
},
connectionDefaults: {
selectable: false
},
editable: false,
click: selectFunc
The "selectFunc" simply sees if the click occurred on an item, and if so, sets a variable to that item for later retrieval.
What I want to be able to do is treat this diagram as single selection only. So, how do I:
1) Disable mouse selection rectangle? If you click and drag the mouse, a selection rectangle forms that will select all shapes it intersects.
2) Disable [CTRL]-Click, which allows multiple selection? In my selectFunc method, I undo the multiple selection and only select the last clicked on item, but the user still sees the multi-select action occur.
3) Make the diagram resizable? It seems if I do not specify an explicit width and height in CSS, the diagram will draw larger than the <div> it is contained within; and my attempts to use CSS to specify margins is also mostly ignored.
4) I utilize the "bringIntoView" method with a parameter of the first shape in the collection to make sure the diagram shows at least the first object in the hierarchy, but can I also specify to show it centered at the top of the available space?
Thanks in advance!
