I have tables on my server with thousands of records and im using ember framework(ember data). for my grid i want to pass only an array of 2500 in total and as the user scrolls server side paging happens and the response update my datasource array but i dont know how. here is what i have sofar:
import Ember from 'ember';
export default Ember.Component.extend({
className: 'kendo-grid',
kendoGrid: null,
initGrid: function () {
this.send('createGrid');
}.on('didInsertElement'),
dataSourceObserver: function () {
this.send('recreateGrid');
}.observes('gridObject'),
actions: {
recreateGrid: function () {
//Every time we recreate the grid, we need to destroy it first and create it again
this.get('kendoGrid').wrapper.empty();
this.get('kendoGrid').destroy();
this.send('createGrid');
},
createGrid: function () {
var gridModelData = this.get('gridObject.source');
var gridHeight = this.get('gridObject.height');
var gridPageSize = this.get('gridObject.pageSize');
var dataSource = {
data: gridModelData,
serverPaging: true,
serverSorting: true,
pageSize: 20,
};
var grid = Ember.$("#kendo-grid").kendoGrid({
dataSource: dataSource,
pageSize: gridPageSize,
pageable: {
refresh: true, //if set to true, it will show refresh button,clicking on that will make the grid to refresh
numeric: false,
previousNext: false,
messages: {
display: "Loaded {0}-{1} from {2} data items"
},
},
height: gridHeight,
groupable: true,
sortable: {
mode: "multiple"
},
filterable: true,
scrollable: {
virtual: true,
},
}).data('kendoGrid');
this.set('kendoGrid', grid);
var pager = grid.pager;
var test_pagechange = function (e) {
console.log(e);
};
pager.bind('change', test_pagechange);
}
}
});
i dont want to use url in my grid datasource.
When users use the "createLink" tool of the editor, I need to trap the output and Make it Bold and Underline.
How can I change the output?
Is there an event I can hook on? an API I can use?
If there is a way to add functionality to any tool of the editor, I would like to be able to do it.
Thank you in advance
Hi,
I have datasource1 which would return result immediately is bound to grid1 , and datasource2 which uses a long running query (~10 seconds) bound to grid2. Both grids are on the same page.
here is the normal flow from chrome console:
datasource1 request started
datasource2 request started
datasource1 request ended
datasource2 request ended
But sometimes datasource2 would block datasource1 (request status = 'Pending' in chrome dev tab), and would return before datasource1:
datasource1 request started
datasource2 request started
datasource2 request ended
datasource1 request ended
Since datasource2 is taking 10seconds, datasource1 would not return until datasource2 is done with request.
to troubleshoot the issues I spread my backend actions (MVC actions) to different controllers and removed any reference to session/cockie but that did not help.
Thank you.
Madani
// returns data where orderId is equal to 10248 or customerName starts with Paul
filter: {
logic: "or",
filters: [
{ field: "orderId", operator: "eq", value: 10248 },
{ field: "customerName", operator: "startswith", value: "Paul" }
]
}
$("#mycalendar").kendoCalendar({
value: today,
dates: events,
change: onChangeCalendar,
month: {
// template for dates in month view
content:
'# if ($.inArray(+data.date, data.dates) != -1) { #' +
'<div class="' +
"exhibition" +
'">#= data.value #</div>' +
'# } else { #' +
'#= data.value #' +
'# } #'
},
footer: false
});
I have my Calendar with onChange function and i'd like to create onSelect function.
At my onChange i create a kendo window to show a message.
This should also happen at onSelect.
-Click element.
-Go to onchange
-Open the window
-Close window
-I click on the same item and it does not open (onSelect is not implemented)
Calendar don't have select event.
How can i do this?
Hi,
Please consider the following dojo :
http://dojo.telerik.com/apujOD
The issue is on the first field "ProductID" when using "number" as the type of its "id".
Steps to reproduce the issue :
1- Create new record
2- Select entry "aaa" or "bbb"
3- Validate entry
4- Edit Entry again and select option label "select..."
5- Validate entry
6- Edit entry again and select "aaa" or "bbb"
7- Validate and you can see that current value is null and you cannot select another value anymore.
Please tell me what I'm doing wrong. Note that this works well when using "string" type.
Thank you.