We have to retro fit the KendoUI Grid to existing pages which means the grid has to post back the form when a record is selected so that the details will load for that record and then grid would have to reload the current state (filtering state, page, grouping, etc). I have managed to make all the work by saving the grid's options that get lost and successfully reloaded the grid.
The one issue I have now is when I turn on filterable option to Mode: "row", it fails once I set the datasource to the grid. It comes up with an Length is not defined JS error message and I noticed that the datasource didn't even get a chance to load the data so I'm sure that's part of the reason but I'm curious what is different about setting the mode to row vs true that would cause this.
Here is the snippet of the load data function that worked under filterable = true vs mode = "row":
function () {
var savedOptions = QuicxKendo.getPageState();
var pageSize = QuicxKendo.options.pageSize || 15;
if (savedOptions != null) {
pageSize = savedOptions.pageSize;
}
var dataSource = new kendo.data.DataSource({
transport: {
read:
function (pageOptions) {
QuicxKendo.setPageState(pageOptions.data);
var data = "{ options: " + QuicxKendo.stringifyData(pageOptions.data) + "}";
$.ajax({
type: "POST",
url: QuicxKendo.options.dataUrl,
datatype: "json",
contentType: "application/json; charset=utf-8",
data: data, // ParameterMap does not work when transport methods are using functions
success: function (result) {
if (result.d.Success) {
if (QuicxKendo.isPostback()) {
var gridOptions = QuicxKendo.getGridOptions();
//-- grouping is lost on postback so set it back in
if (gridOptions) {
QuicxKendo.grid.dataSource._group = gridOptions.dataSource.group;
}
QuicxKendo.setIsPostback(false);
}
// notify the DataSource that the operation is complete
pageOptions.success(result);
QuicxKendo.kendoGridSetSelectedRow(QuicxKendo.grid);
$('#' + QuicxKendo.options.detailContainerId).show();
} else {
toastr.error("There was an issue loading the grid.", "Error");
pageOptions.error(result);
}
},
});
}
},
serverSorting: true,
serverPaging: true,
serverFiltering: true,
serverGrouping: false,
pageSize: pageSize,
schema: {
data: "d.Data.Data",
total: function (result) {
return result.d.Data.Total;
},
model: JSON.parse(QuicxKendo.columnSchema.schema)
},
change: function (e) {
QuicxKendo.saveGridState();
}
});
if (savedOptions) {
dataSource._page = savedOptions.page;
dataSource._sort = savedOptions.sort;
dataSource._group = savedOptions.group;
dataSource._filter = savedOptions.filter;
}
QuicxKendo.grid.setDataSource(dataSource);
};
hello there,
There is an common bug in bar chart with the type of "bar", if the value become 0 along with some other negative values, the label of value 0 will overlap the category axis label, please see the attached image.
So here I want move the series label to left of the value axis with the visual function. please refer to telerik demo.
With the visual function, the series label is clipped, and no matter what number of the plot area margin I set , it cannot show the label completely. Is there any way to realize this effect?
It is great if there is a good way to make the label which value is 0 will not overlap the category label.
Thanks in advance.
Am using Kendo datepicker Range for dates showing from date and to date in my application developing in AngularJs.
My requirement is once to date is selected , the from date has to show the dates after selected to-date as disabled . I am using k-max = "vm.maxDate" and dates after the to-date is not visible. Similarly for to-date , the dates prior to from-date is not visible where as it should be disabled as per my requirement .
<input kendo-date-picker k-max = "vm.maxDate" k-rebind = "vm.maxDate" id="fromdate" />
<input kendo-date-picker k-min = "vm.minDate" k-rebind = "vm.minDate" id="todate" />
While loading the page , we are setting the default values as :
vm.maxDate = new Date();
vm.minDate = new Date(2000, 0, 1, 0, 0, 0);
Please help me on this
demo:
http://dojo.telerik.com/aDevo
Hello,
I've been asked to migrate an existing KendoUI grid to Kendo UI pivot grid.... before I was doing
.DataSource(dataSource => dataSource .Ajax() .ServerOperation(false) .Read(action => action.Action("LoadOperations", "InquiryOperations").Data("getData")) )How can I do this with pivot since the Transport helper doesn't support Data?
.DataSource(dataSource => dataSource .Ajax() .Transport(transport => transport.Read("LoadOperations", "InquiryOperations").Data("getData")))Thanks
Working with Kendo UI version 2016.2.504, I have tested two filtering method calls across the same odata-v4 dataSource:
1. via .filter() - gridStage.model.DS.filter(DSfilter()) results in:
/app/odata/vwgriddc_info?%24format=json&%24orderby=dc_name&%24filter=dc_id+eq+109&%24count=true
2. via .query() - gridStage.model.DS.query(DSfilter()) results in:
/app/odata/vwgriddc_info?%24format=json&logic=and&filters%5B0%5D%5Bfield%5D=dc_id&filters%5B0%5D%5Boperator%5D=eq&filters%5B0%5D%5Bvalue%5D=109&%24count=true
The former works perfectly; the latter fails to properly encode the filter in odata-v4 format and ignores the existing sort parameter.
I would prefer to render the return within the .query().then() promise, but have worked around the problem with .filter() and requestEnd/setTimeout.
Are there plans to update .query() to support odata-v4? Or, is there some other sort of work around to this issue.
Thanks!
Hello,
I have attached a picture to better illustrate my issue --
When viewing the scheduler on a tablet device, I have noticed that when i try to scroll up and down that the table the events sit on do not align properly with the times. When the scheduler first loads, everything seems to look fine. However, scrolling (as a touch event) causes the issue. Please advise?
Hi,
I'm trying to populate my grid using a .json schema but i'm facing a weird problem. I first collect the data and initialize the datasource, with both structures being exactly the same. When the grid is drawed it doesn't follow the order of both structures and it "randomly" loads the rows.
This start happening with 5 or more rows.
I think it's a problem related to how Kendo draws the grid in the DOM.
I'm using Kendo with Angular2:
@ViewChild("kendoGrid")
private kendoGridElement: ElementRef; this.kendoGrid = jQuery(this.kendoGridElement.nativeElement).kendoGrid(this.kendoGridOptions).data("kendoGrid");kendo.bind(this.kendoGridElement.nativeElement, data);
this.kendoGridOptions = { dataSource: { data: data, pageSize: pageSize, group: { field: "test", dir: "desc" }, schema: { model: { id: "code" } } }, sortable: true, groupable: false, scrollable: { virtual: false }, columns: [ { field: "shortText", title: "Name", headerTemplate: template1 }, { field: "valueAsString", title: "Value", headerTemplate: template2, }, { field: "category", title: "Type", headerTemplate: template3, }, { field: "tags", title: "Tags", headerTemplate: template4, template: template5 }, { field: "longText", title: "Description", headerTemplate: template6 }, { title: "Command", template: template7, }, { field: "isPinned", title: " ", width: "40px", template: template8 ], };
Hi,
we can't use the MaskedTextBox in our MVVM project because there's a bug when masking with only digits & spaces (for example the simple mask "999"). The mask won't work because a function from Kendo UI seems to expect a thousand or decimal placeholder. This can be easily reconstructed in the MVVM demo for the MaskedTextBox:
http://dojo.telerik.com/exIYe
I just changed the mask to "999" and it is not working any longer. As far as I can tell, no combination without a decimal or thousand placesholder seems to work. Except "000" for example also seems fine, but the number shown is not masked the right way.
Could you please look into this?
Regards,
Steve.

