Telerik Forums
Kendo UI for jQuery Forum
3 answers
283 views

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.

Viktor Tachev
Telerik team
 answered on 21 Nov 2017
1 answer
330 views

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

Dimitar
Telerik team
 answered on 21 Nov 2017
5 answers
367 views

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

Konstantin Dikov
Telerik team
 answered on 21 Nov 2017
1 answer
6.9K+ views
Give how awesome Kendo is I thought I'd ask. (I haven't see it in the docs)

Is there a way, in MVC, to enforce that DatePicker 2 is before DatePicker 1. It's a fairly common validation for forms with a From and To date.

Thanks
Stefan
Telerik team
 answered on 21 Nov 2017
1 answer
6.6K+ views
I can do something like
// 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" }
    ]
}

However, I am wondering... if it is possible to get filtering on condition like:
orderID is equal to 10248 or
( customerName starts with "Paul" and customerLastName start with "B" ) ?

Would you help me translate the conditions to filter: { ... } syntax?

Thank you,




Plamen
Telerik team
 answered on 21 Nov 2017
2 answers
367 views
Hi,

How can I disable these multiple features from the diagrams?

1. Draggable objects
2. Dynamic connectors (the ones that you add once the diagram is already rendered)
3. Zooming with the mouse scroll
4. Ctrl+Z effect


Thank you!
Gabbi
Top achievements
Rank 1
 answered on 21 Nov 2017
1 answer
426 views
$("#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?

Stefan
Telerik team
 answered on 21 Nov 2017
5 answers
348 views

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.

 

Alex Hajigeorgieva
Telerik team
 answered on 20 Nov 2017
23 answers
1.0K+ views
I have a grid with edit : popup.
I want to add a custom command that will open the popup editor in adding new row  mode
but will have the values of the current record (like duplicate row).
Stefan
Telerik team
 answered on 20 Nov 2017
3 answers
150 views
I have tried navigating to remote views via both anchors that have href set and in JS by app.navigate("test.html") and no matter which way i perform the navigation, navigating back (pressing the back button in the nav bar or pressing back in the browser) results in the application navigating to the starting index page. It's as though the views that are navigated to are not being recorded as I navigate to them. I have not been able to find much information on this. The only relevant information I found was to check app.pane.history (an array) and sure enough it was empty after I had perfomed a few jumps of navigation. I'm not really sure what to do at this point beyond trying to catch the back event and implement the history manually. Any suggestions?
Veselin Tsvetanov
Telerik team
 answered on 20 Nov 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?