Telerik Forums
Kendo UI for jQuery Forum
1 answer
103 views
Hi All,

I have implement Column menu filtering in Grid, but facing one issue in that:

Issue:

- When user clicks / touch (for tabs / smartphones), column and filter drop-down will open sometime on left and sometimes on right of the main drop-down.
- And as per our observation on first click /  touch it works fine but on next clicks it will shifting the position.
- Also for some devices it works fine and for some devices it wont.
- And because of that behavior user not able to perform any action when its open.

Please check the attached screen shots.

Quick help will be appreciated ..!!

Thanks
Preslav
Telerik team
 answered on 20 Aug 2019
6 answers
429 views

Hello Everyone,

I am facing problem in implementing the kendo alert functionality.

In my page I am using kendo grid which is working perfectly. But when I am trying to use kendo alert, javascript error comes "kendo.alert is not a function". Below is a part of the code.

kendo.ui.progress($('#myGridDiv'), true);
            $.ajax({
                url: '<%=ResolveUrl("~/ReportDataService.asmx/GetReportData") %>',
                data: "{'Office':'" + Office + "','Team':'" + Team + "','Client':'" + Client + "','FileNo':'" + FileNo + "','BillNo':'" + BillNo + "'}",
                type: "POST",
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (data) {
                    if (data.d.length > 0) {
                        var grid = $('#myGridDiv').getKendoGrid();
                        grid.dataSource.data(data.d);
                        grid.refresh();
                    }
                    else {
                        kendo.alert('No results found. Displaying last searched results.');     //--> Error comes from here. If no record is found for the grid.
                    }
                    kendo.ui.progress($('#myGridDiv'), false);
                },
                error: function (error) {
                    alert("Error: " + JSON.stringify(error));
                    kendo.ui.progress($('#myGridDiv'), false);
                }
            });

The scripts that I am using are

<link rel="stylesheet" href="Styles/kendo.common.min.css" />
    <link rel="stylesheet" href="Styles/kendo.default.min.css" />
    <link rel="stylesheet" href="Styles/kendo.default.mobile.min.css" />
<script src="Scripts/jquery.min.js"></script>
    <script src="Scripts/jszip.min.js"></script>
    <script src="Scripts/kendo.all.min.js"></script>

Can somebody please help.

Thanks & Regards

Viktor Tachev
Telerik team
 answered on 20 Aug 2019
5 answers
6.3K+ views
I made a simple example here using local data. Notice that the refresh button when clicked puts refreshed called. but refreshing is only output on the initial load. 
http://jsbin.com/ohumul/3/edit

$('#refresh').button().click(function(){
    $('body').prepend('refresh called.<br/>');
     
    var grid = $("#grid").data("kendoGrid");
       
      grid.refresh();
       
   
   
  });
Mallika
Top achievements
Rank 1
 answered on 19 Aug 2019
6 answers
537 views
Hello,

I am using KENDO UI with IFRAME and I want to display an alert when the user clicks to close his WEB browser when the IFRAME is active with KENDO.

Thank you in advance :)
Aleksandar
Telerik team
 answered on 19 Aug 2019
6 answers
3.3K+ views
Hello,

I'm using the following javascript method to remotely bind a datasource. I am trying to pass the "headers" array to the web service
function changeColumns() {
    var headers = new Array();
     
    $("#columns").children().each(function () {
        if ($(this).attr("checked") == "checked") {
            headers.push($(this).attr("id"));
        }
    });
 
    var grid = $("#GridTest").data("kendoGrid");
    var ds = grid.dataSource;
    grid.columns = [];
    grid.thead.remove();
    ds.data({
        transport: {
            read: {
                url: controller + "Test_Read",
                dataType: "json",
                data: { headers: headers }
            },
            parameterMap: function (options) {
                return kendo.stringify(options);
            },
            type: "json"
        },
        pageSize: 10,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true
    });
 
    $("#GridTest").kendoGrid({
        dataSource: ds,
        scrollable: true,
        sortable: true,
        reorderable: true,
        resizable: true
    }).data("kendoGrid");
}

At runtime, the headers parameter in the web service method (shown below)  is of type object. If I specify a type other than object in the method signature (eg: string[] or string), then headers is null.
public ActionResult Test_Read([DataSourceRequest] DataSourceRequest request, object headers = null)
{
    return Json(GetProductsDynamic(headers).ToDataSourceResult(request));
}

Can anyone help me get the values I'm sending in the format it was sent?
Thanks!

Edit: After looking in firebug, my POST parameters being sent are :
"sort=&page=1&pageSize=10&group=&filter="
So it seems the data isn't being sent at all.
Michael
Top achievements
Rank 1
 answered on 16 Aug 2019
1 answer
147 views
Hello, im simulating having a datasource by generating the data with javascript and binding that to a datasource object in kendo. Could this be the issue for the false positives on column C? Im also open to other suggestions on how can i color cells  depending on their value with datasource binding
Example: https://dojo.telerik.com/UcAFowEP/3
Veselin Tsvetanov
Telerik team
 answered on 16 Aug 2019
1 answer
151 views

Hey.

Some of my grids have many columns. Is it possible to a-z sort columns before they are displayed in the column picker?

Best regards

Morten

Eyup
Telerik team
 answered on 16 Aug 2019
4 answers
27.3K+ views
How do I get the grid's selected row and its DataItem.?

After searching around since I couldn't find any sample from any of the Grid demo samples, I also consulted the documentation.
But still not clear on how to do it.

Do I need to subscibe to the change event?
.Events(events => events.Change("GSSelectionChange")

Or can I directly get the selected row and its DataItem like the following
var grid = $("#usersGrid").data("kendoGrid");
var selectedItem = grid.dataItem(grid.select());

So far, getting the selected row and its DataItem directly (w/out subscribing to the Change event) doesn't work.

I would appreciate any help or tip on how to get this done.














Tsvetomir
Telerik team
 answered on 16 Aug 2019
2 answers
238 views

Hi, 

How can I get the moveEnd to wait until a promise is resolved before ending completing?

Currently I have the following:

moveEnd: function(e) {
  if (!isEventValid(e.start, e.end)) {
    e.preventDefault();
    return false;
  }
 
  $.when(getAssistance(e.event, e.start, e.end))
    .done(function() {
      window.location = "/new-url";
    }).
    fail(function() {
      // 1
      e.preventDefault();
      return false;
    });
}

 

(I dont know how to get out of this editor)

My problem is that the 'moveEnd' completes before the promise is complete. If the Promise resolved and the user redirected, its a non-issue, but if the promise is rejected, the move needs to be prevented.

Please advise, Thanks,
Grant

Grant
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 16 Aug 2019
3 answers
528 views

Hey everyone,

We are currently trying out Kendo UI to see if it would fit our needs.
Spreadsheets are very important us, and we want to do something very specific with them.

We want to be able to merge multiple exported spreadsheets (output of saveJSON()), so that the first spreadsheet will be shown on top of the second spreadsheet, ...
We have looked through the developer documentation, but there does not seem to be a way to do it.
The problem is that there is no way to, in code, load/paste data at a specific row index.

If we were able to 'copy' and 'paste' in code, we might get somewhere, although that is still not ideal.

Use case: We want the user to create 'template' spreadsheets, which can later be combined in a single spreadsheet.
f.e.:

- User creates a 'header ' template spreadsheet with content like: Title, name, an image
- User creates a 'body' template spreadsheet specific information regarding ...
- User creates a new empty spreadsheet and loads the header template spreadsheet, and after that, the body spreadsheet.
- The header template will appear above the body spreadsheet.

If someone could help us with this, it would be very much appreciated.

 
Veselin Tsvetanov
Telerik team
 answered on 15 Aug 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?