Telerik Forums
Kendo UI for jQuery Forum
1 answer
99 views

Hello,

I'm using scheduler in a very simple mode - a read-only month view. I'd like to read from the server every time the user navigates. I have found some sample code on this forum from 2013, however the latest library code is a bit different.

Anyway, I have an ALMOST working solution. I have serverFiltering = true, and my Controller method is set up to work with DataSource filtering:

public virtual JsonResult HistoryData(Guid id, [DataSourceRequest] DataSourceRequest request)

However, the scheduler JS library fails because it expects the data to some back in a simple list format. The controller is obviously returning a "filterable" format like so:

Data->

    Total:1

     Filters: ...

     Errors: ...

     Data: [...]

 

So my question is, if we're using serverFilterable flag to force the reads, shouldn't I be able to use [DataSourceRequest] in my controller?
Could you please provide an up-to-date MVC project sample for this scenario?

Many thanks.

Veselin Tsvetanov
Telerik team
 answered on 12 Jan 2017
1 answer
786 views

Hi
   I am using helptext by using kendo window, I kendo combobox am using the helptext to show the message. When I click the helptext in the combobox the kendo window was shown correctly.

The actual issue was When I click outside of the combobox the combobox will close and it's working correct, but in combobox dropdown When I click helptext the kendo window was shown correctly meanwhile if I click outside of the combobx both the helptext(kendo window) and the dropdown have to close.

The issue is only the combobx dropdown only closing the kendow window was still remains as open. I tried in the combobox close function "$('#window').data("kendoWindow");" it shown as undefined.

Help me in that how to close the kendow window. here I attacthed the code screenshot for your reference and I used bothe the combobx and the helptext as separate files.
Ianko
Telerik team
 answered on 12 Jan 2017
1 answer
107 views

Hello,

I'm playing with Kendo Grid and there is getOptions() method. I want to autosave user config after a change (after debouncing it). Cannot find a propper event. How can I get an event when user changes its configuration?

Best regards,

Eduardo Serra
Telerik team
 answered on 11 Jan 2017
4 answers
519 views

I have an MVC view of 3 Kendo UI Grids, along with an Export to Excel button to export the data from the 3 grids to 3 Excel worksheets.

The following is a sample of the page script (with column detail removed for simplicity).

When I execute the Export button, I get a Javascript error "Unable to get property 'saveAsExcel' of undefined or null reference" at the line identified below with //##errorLine##. So for some reason the grid references can not be determined.

What am I missing here?

<script type="text/javascript">
    // used to sync the grid exports
    var promises = [
      $.Deferred(),
      $.Deferred(),
      $.Deferred()
    ];
</script>
<div style="text-align:center;">
    @(Html.Kendo().Grid(Model)
        .Name("HccWp")
        .Columns(columns =>
        {
...
        })
        .ClientDetailTemplateId("outOfBalanceDetailTemplate")
        .Sortable(sortable => sortable.SortMode(GridSortMode.SingleColumn).AllowUnsort(true))
        .Resizable(resizable => resizable.Columns(true))
        .AutoBind(true)
        .Events(e => e
            .DataBound(@<text>function(e) {onDataBound(e, "HccWp")}</text>)
            .ExcelExport(@<text>function(e) {e.preventDefault(); promises[0].resolve(e.workbook);}</text>)
        )
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model =>
            {
                ...
            })
        )
)
</div>
<div style="text-align:center;">
    @(Html.Kendo().Grid(Model)
        .Name("HccPr")
        .Columns(columns =>
        {
            ...
        })
        .ClientDetailTemplateId("outOfBalanceDetailTemplate")
        .Sortable(sortable => sortable.SortMode(GridSortMode.SingleColumn).AllowUnsort(true))
        .Resizable(resizable => resizable.Columns(true))
        .AutoBind(true)
        .Events(e => e
            .DataBound(@<text>function(e) {onDataBound(e, "HccPr")}</text>)
            .ExcelExport(@<text>function(e) {e.preventDefault(); promises[1].resolve(e.workbook);}</text>)
        )
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model =>
            {
                ...
            })
        )
)
</div>
<div style="text-align:center;">
    @(Html.Kendo().Grid(Model)
        .Name("PointWp")
        .Columns(columns =>
        {
            ...
        })
        .ClientDetailTemplateId("outOfBalanceDetailTemplate")
        .Sortable(sortable => sortable.SortMode(GridSortMode.SingleColumn).AllowUnsort(true))
        .Resizable(resizable => resizable.Columns(true))
        .AutoBind(true)
        .Events(e => e
            .DataBound(@<text>function(e) {onDataBound(e, "PointWp")}</text>)
            .ExcelExport(@<text>function(e) {e.preventDefault(); promises[2].resolve(e.workbook);}</text>)
        )
        .DataSource(dataSource => dataSource
            .Ajax()
            //.PageSize(20)
            .Model(model =>
            {
                ...
            })
        )
)
</div>
<br />
<div>
    <button id="export" class="k-button"><span class="k-icon k-i-excel"></span>&nbsp;Export to Excel</button>
</div>

<script type="text/javascript">
  $("#export").click(function(e){
    // trigger export of the HccWp grid
    $("#HccWP").data("kendoGrid").saveAsExcel();  //##errorLine##
    // trigger export of the HccPr grid
    $("#HccPR").data("kendoGrid").saveAsExcel();
    // trigger export of the PointWp grid
    $("#PointWP").data("kendoGrid").saveAsExcel();
    // wait for all exports to finish
    $.when.apply(null, promises)
     .then(function (hccWpWorkbook, hccPrWorkbook, pointWpWorkbook) {

      // create a new workbook using the sheets of the 3 workbooks
      var sheets = [
        hccWpWorkbook.sheets[0],
        hccPrWorkbook.sheets[0],
        pointWpWorkbook.sheets[0]
      ];

      sheets[0].title = "HccWP";
      sheets[1].title = "HccPR";
      sheets[2].title = "PointWP";

      var workbook = new kendo.ooxml.Workbook({
        sheets: sheets
      });

      // save the new workbook
      kendo.saveAs({
        dataURI: workbook.toDataURL(),
        fileName: "BCBalancing.xlsx"
      })
    });
  });
</script>

Dimiter Topalov
Telerik team
 answered on 11 Jan 2017
1 answer
111 views

have multiple series for pie chart ? (attached pic )

Eduardo Serra
Telerik team
 answered on 11 Jan 2017
1 answer
100 views
Hello

Currently Kendo UI for Angular 2 is in it's beta stage and probably is free and i want to use it in one of my project. I'm curious when the stable version comes out will I be required to purchase/pay for it?
Petyo
Telerik team
 answered on 11 Jan 2017
1 answer
146 views

Hi
I am using kendo-Dialog for shown the Employee Details. In Chrome or Mozilla when I use CTRL+A all the details in the dialog was selecting correctly. But in IE browser when I use CTRL+A the Select All keys are working but the values are not selected in the same Dialog for IE Browser.

I have used below code:

this.$(".employee").keydown(function (e) {
if (e.ctrlKey) {
if (e.keyCode == 65 || e.keyCode == 97) { // 'A' or 'a'
alert("Alert");
$(this).select();
}
}
});

But its not working in IE 11.

Ianko
Telerik team
 answered on 11 Jan 2017
1 answer
263 views

Here's an example of what I'm working with: http://dojo.telerik.com/uYidA/7

I'm making a grid that is using autoSync and in cell editing for updating rows and allowing the rows to be reordered with kendo sortable as well.

The issue I'm running into is whenever you try to add a new record I'm getting this error "Uncaught TypeError: Cannot read property 'closest' of undefined" which is due to autoSync trying to find a row that isn't currently there yet.

What I'm wondering is if there's a way to add a row using the edit/update/delete whenever I'm using batch and in cell editing?

Basically I'm wanting to be able to update rows with in cell editing using autoSync to save as you go, but whenever you add a new record to use inline editing so that I'm not creating a blank record in the database and then updating that blank record?

Let me know if that makes sense! I know it's a little confusing

Thanks!

Boyan Dimitrov
Telerik team
 answered on 10 Jan 2017
2 answers
175 views

Hello,

There is the following issue.

I cant drag from one grid to another when the second has no data.

here is the dojo: http://dojo.telerik.com/UZaMU

Venelin
Top achievements
Rank 1
 answered on 10 Jan 2017
3 answers
236 views

Trying to run some unit tests of our Kendo components which are wrapped in Marionette Views and am getting a "kendoGrid is not a function" error, and am not sure why.

The kendo global is attached to window, and all the kendo* functions do come up as undefined in the debugger.

Here is the load order from the body of the karma debugger:

<script type="text/javascript" src="/base/node_modules/jasmine-core/lib/jasmine-core/jasmine.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/node_modules/karma-jasmine/lib/boot.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/node_modules/karma-jasmine/lib/adapter.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/web-libs-common/src/main/resources/META-INF/resources/static/js/lib/jquery/jquery.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/web-libs-common/src/main/resources/META-INF/resources/static/js/lib/kendoui/kendo.all.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/node_modules/requirejs/require.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/node_modules/karma-requirejs/lib/adapter.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="/base/test-main.js" crossorigin="anonymous"></script>

 

jQuery does not get loaded twice, BUT setting a break point in one of the tests and then inspecting it shows another jQuery script tag in the head element which is gone after all the tests run/blow up.

My karma.conf.js, test-main.js, and require.js config are here if needed:
StackOverflow Post

Any help would be greatly appreciated!

Marin Bratanov
Telerik team
 answered on 10 Jan 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?