Telerik Forums
Kendo UI for jQuery Forum
1 answer
805 views

Hi, 

As my title says, im trying to change the icons of the command buttons in my inline grid.

Now I've managed about 73% of the way; by setting the edit icons in the 'dataBound' event and the update icons in the 'edit' event. But when the user clicks 'cancel' (in edit mode) kendo resets the icons to the kendo standard. What event can I trigger after a cancel has completed  to reset the icon to my custom ones?

For Info purposes

dataBound: function(e) {
  $(".k-grid-edit").find("span").removeClass().addClass("fa fa-pencil");
  $(".k-grid-destroy").find("span").removeClass().addClass("fa fa-times");
},
edit: function(e) {
  $(".k-grid-update").find("span").removeClass().addClass("fa fa-check");
  $(".k-grid-cancel").find("span").removeClass().addClass("fa fa-ban");
}

 

Please advise on how I can achieve this or if there is a more efficient way to do the same thing.

Kind Regards,
Grant

Dimiter Topalov
Telerik team
 answered on 31 Jan 2017
1 answer
176 views

We want to set a variable editable value for all grid columns. The value is configured in our json-file, but we don't know how to assign the value from json to the editable option.

http://dojo.telerik.com/@brandung/eKOyi/16

Vladimir Iliev
Telerik team
 answered on 31 Jan 2017
1 answer
237 views

Hello

I want to use the new "noDataTemplate" to add new items as in this example: http://demos.telerik.com/kendo-ui/combobox/addnewitem

If I type "custom" in the example I can then add that as a new item.

But I can't add a new item called "Cha" because there are 3 other items starting with "cha". I know there is a conflict here: Should we show the 3 items or the add-new-item-dropdown. But do you have a solution for this problem? E.g show the add-new-item-dropdown above the input so that both can be active at the same time? Or is it not possible?

Boyan Dimitrov
Telerik team
 answered on 31 Jan 2017
1 answer
179 views

I have multiple buttons for things such as save, save as, new, etc. I wrote the function below so that we could easily call these windows without individually writing JS and HTML for each. Currently everything works except the title. The title displays as the first window opened, if i open Save then close, then open Delete the delete window content is displayed with the Save title. thanks for any help

 

JS

$(".kendo--modal").click(function(e) {
    var div     = $(this).attr("data-div"),
        title   = $(this).attr("data-title"),
        content = $(this).attr("data-content"),
        h       = $(this).attr("data-h"),
        w       = $(this).attr("data-w");
   createKendoModal(div, title, content, h, w ) 
});

 

HTML

                        <li>
                            <a class="kendo--modal"
                           data-title="Save View As"
                           data-div = "#window"
                           data-content = "/templates/html/modal--save.html"
                           data-h = "800"
                           data-w ="800"
                           >Save As
                           <span class="glyphicon glyphicon-floppy-open"></span>
                           </a>
                        </li>
                        <li>
                           <a class="kendo--modal"
                           data-title="Delete View"
                           data-div = "#window"
                           data-content = "/templates/html/modal--delete.html"
                           data-h = "800"
                           data-w ="800">Delete 
                           <span class="glyphicon glyphicon-trash"></span>
                           </a>
                        </li>

Ryan
Top achievements
Rank 1
 answered on 30 Jan 2017
2 answers
75 views
Hello, my json output is a bit different that what is need. I've attached a screenshot of what it looks like. Can I use this as the datasource?
Vivek
Top achievements
Rank 1
 answered on 30 Jan 2017
10 answers
531 views

Hello, I've been testing the PivotGrid using local data binding and have some questions:

Is there any way that I can make a button to expand all rows and columns with local data binding? I tried to do that in the column using

pivotgrid.dataSource.expandColumn("Dimension1&Value", "Dimension2");

but the grid's colspan was all wrong (see image attached). Is there any way to fix this? I tried to do the same thing on the row and it works fine.

Joey
Top achievements
Rank 1
 answered on 30 Jan 2017
1 answer
783 views

I want the Numeric text box to show the integer values(and not any decimal part) for which we set the below options and it seems to show the values properly in integers in both IE and chrome browsers.. but both the up and down buttons are not working only in Internet explorer whereas it works perfectly in chrome... How can this be fixed..??

$("#size").kendoNumericTextBox({
     value: 32.3,
     min: 0,
     max: 480,
     step: 5,
     decimals: 0,
     format: '0.'
});

The above sample code is available in this fiddle link(http://jsfiddle.net/Mgb77/)

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 30 Jan 2017
1 answer
228 views

Hi,

I am binding kendo grid on Ajax call and designed the grid as below. But this is not responsive . I have included all kendo bootstrap styles. But still grid columns are not responsive, Please advice.

 @(Html.Kendo().Grid(PInfo)
                                .Name("grdPdetails")
                                .Columns(columns =>
                                {
                                    columns.Bound(p => p.PId).ClientTemplate("<a href='" + Url.Action("PSummary", "Home") + "?PId=#= PId #'" + ">#= PId #</a>").Title("Edit").Width(75);
                                    columns.Bound(p => p.DataSource).ClientTemplate("#= DataSource ? DataSource : '' #").Title("Data Source").Width(150);
                                    columns.Bound(p => p.LastName).ClientTemplate("#= LastName ? LastName : '' #").Title("Last Name").Width(250)

 })
                                .HtmlAttributes(new { @class = "ra-section"})
                                .Scrollable(s => s.Enabled(true))
                                .Sortable()
                                .Pageable(pageable => pageable
                                    .Refresh(true)
                                    .PageSizes(true)
                                    .ButtonCount(5))
                                    .DataSource(dataSource => dataSource
                                                            .Ajax()
                                                            .PageSize(10)
                                )

)

Tina Stancheva
Telerik team
 answered on 30 Jan 2017
1 answer
544 views
I'm trying to make a grid inside the cell of another grid, but I keep getting this e.slice is not a function error. 

<div id=""RundownGrid""></div>
<script>
 
function RefreshRundowns() {
$(""#RundownGrid"").kendoGrid({
    scrollable: false,
    noRecords: true,
    pageable: false,
    columns: [
        {
            title: ""Inbound"",
            field: ""Inbound"",
            attributes: {
                ""id"": ""InboundGrid""
            },
            template: function RefreshInbounds(Inbound) {
                $(""#InboundGrid"").kendoGrid({
                    scrollable: false,
                    noRecords: true,
                    pageable: false,
                    columns: [
                        {
                            title: ""Vessel Name"",
                            field: ""VesselName"",
                            encoded: false,
                        },
         
                        {
                            title: ""Draft"",
                            field: ""CombinedDraft"",
 
                        },
                        {
                            title: ""Origination"",
                            field: ""CodesDescriptionFrom""
                        },
         
                        {
                            title: ""Destination"",
                            field: ""CodesDescriptionTo""
                        },
                        {
                            title: ""Time"",
                            field:""OrderTime"",
                            width: 33,
                        },
                        {
                            title: ""Pilots"",
                            field: ""CombinedPilots"",
                            encoded: false,
                        }
 
                    ],
                    dataSource:
                    {
                        type: ""json"",
                        transport: {
                            read: Inbound
                        }
                    },
                    schema: {
                        model: {
                            VesselName: {type: ""string""},
                            CombinedDraft: {type: ""string""},
                            CodesDescriptionFrom: {type: ""string""},
                            OrderTime: {type: ""string""},
                            CodesDescriptionTo: {type: ""string""},
                            CombinedPilots: {type: ""string""},
 
                        }
                    },
                    dataBound: function (e) {
        
        
                      var data = this._data;
         
         
 
                        for (var x = 0; x < data.length; x++) {
             
                            var di = data[x];
             
                            var tr = this.element.find(""[data-uid='"" + di.uid + ""']"");
                            if (di.IsDaylightOnlyJob) { tr.addClass(""DaylightJob""); }
                            if (di.IsTwoPilotJob) { tr.addClass(""TwoPilotJob""); }
 
                        }
                    }
 
                });
            },
            encoded: false,
        },
         
        {
            title: ""Shifts"",
            field: ""Shifts"",
            attributes: {
                ""id"": ""HarborShiftGrid""
            },
            template: """",
            encoded: false,
 
        },
        {
            title: ""Outbound"",
            field: ""Outbound"",
            attributes: {
                ""id"": ""OutboundGrid""
            },
            template: """",
            encoded: false,
        },
         
         
 
    ],
    dataSource:
    {
        type: ""json"",
        transport: {
            read: {
                url: RundownAPI + ""WallRundowns"",
                dataType: ""json"",
                type: ""GET"",
                contentType: ""application/json""
            }
        },
        schema: {
            model: {
                data: ""Inbound"",
                Shifts: {type: ""data""},
                Outbound: {type: ""data""},
             
 
            }
        },
    },
                                 
     
 
});
}

 

 

And a response from the data service would look like this (there's a lot of extra information in the response, I know)

 

{
  "Inbound": [
{
      "VesselName": "SEA BIRD",
      "CombinedDraft": "39.08",
      "CodesDescriptionFrom": "Sun Terminal #3 Hout",
      "CodesDescriptionTo": "SB Buoy",
      "OrderTime": "08:00",
      "StartDate": "01/09",
      "SbbTime": "-",
      "C09Time": "11:09",
      "C930Time": "-",
      "MsqptTime": "-",
      "NriTime": "10:13",
      "CombinedPilots": "S. D. WILLIAMS,<br> C. D. BANCROFT",
      "Sun5Time": "-",
      "ClearTime": "08:40",
      "PilotRestEarned": false,
      "SecondPilotRestEarned": false,
      "ThirdPilotRestEarned": false,
      "HasTransportation": false,
      "PilotHasTransportation": false,
      "SecondPilotHasTransportation": false,
      "ThirdPilotHasTransportation": false,
      "CallSign": "9V2730",
      "Conf": "Due",
      "Confirmed": false,
      "Direction": "OUTBOUND",
      "EstDateOnBoard": "2017-01-09T00:00:00",
      "ExtraYesNo": "N",
      "FirstPilotCode": 30,
      "IsDaylightOnlyJob": false,
      "IsOlder": false,
      "IsTwoPilotJob": true,
      "LastChange": "Daniel Dubois",
      "OnBoardDateTime": "0001-01-01T00:00:00",
      "OnBoardDate": "0001-01-01T00:00:00",
      "OrderDateTime": "2017-01-09T08:00:00",
      "PilotAboardDateTime": "0001-01-01T00:00:00",
      "PilotFinishTime": "0001-01-01T00:00:00",
      "PilotCode": 30,
      "PilotName": "S. D. WILLIAMS",
      "PilotPhone": "409-626-4805",
      "RundownDraftFeet": 39,
      "RundownDraftInches": 1,
      "RundownNotes": "ORDER",
      "SecondPilotCode": 0,
      "SecondPilotName": "C. D. BANCROFT",
      "ThirdPilotCode": 0,
      "ThirdPilotName": "",
      "TimeEstimate": "0800",
      "VesselBeam": 120.25,
      "VesselBredthFeet": 120.25,
      "VesselDwt": 52541,
      "VesselFlag": "SGP",
      "VesselHoldYesNo": "",
      "VesselHoldDescription": "",
      "VesselHoldDate": "0001-01-01T00:00:00",
      "VesselImo": "9726061",
      "Tugprimary": "",
      "VesselLoa": 738.25,
      "VesselNote": "NO THRUSTERS",
      "VesselRestriction": "2 PILOTS NON-DAYLIGHT",
      "VesselRestrictionDate": "1901-01-01T00:00:00",
      "AssignDate": null,
      "AssignDT": "0001-01-01T00:00:00"
    }
],
  "Shifts": [
    {
      "VesselName": "SEA BIRD",
      "CombinedDraft": "39.08",
      "CodesDescriptionFrom": "Sun Terminal #3 Hout",
      "CodesDescriptionTo": "SB Buoy",
      "OrderTime": "08:00",
      "StartDate": "01/09",
      "SbbTime": "-",
      "C09Time": "11:09",
      "C930Time": "-",
      "MsqptTime": "-",
      "NriTime": "10:13",
      "CombinedPilots": "S. D. WILLIAMS,<br> C. D. BANCROFT",
      "Sun5Time": "-",
      "ClearTime": "08:40",
      "PilotRestEarned": false,
      "SecondPilotRestEarned": false,
      "ThirdPilotRestEarned": false,
      "HasTransportation": false,
      "PilotHasTransportation": false,
      "SecondPilotHasTransportation": false,
      "ThirdPilotHasTransportation": false,
      "CallSign": "9V2730",
      "Conf": "Due",
      "Confirmed": false,
      "Direction": "OUTBOUND",
      "EstDateOnBoard": "2017-01-09T00:00:00",
      "ExtraYesNo": "N",
      "FirstPilotCode": 30,
      "IsDaylightOnlyJob": false,
      "IsOlder": false,
      "IsTwoPilotJob": true,
      "LastChange": "Daniel Dubois",
      "OnBoardDateTime": "0001-01-01T00:00:00",
      "OnBoardDate": "0001-01-01T00:00:00",
      "OrderDateTime": "2017-01-09T08:00:00",
      "PilotAboardDateTime": "0001-01-01T00:00:00",
      "PilotFinishTime": "0001-01-01T00:00:00",
      "PilotCode": 30,
      "PilotName": "S. D. WILLIAMS",
      "PilotPhone": "409-626-4805",
      "RundownDraftFeet": 39,
      "RundownDraftInches": 1,
      "RundownNotes": "ORDER",
      "SecondPilotCode": 0,
      "SecondPilotName": "C. D. BANCROFT",
      "ThirdPilotCode": 0,
      "ThirdPilotName": "",
      "TimeEstimate": "0800",
      "VesselBeam": 120.25,
      "VesselBredthFeet": 120.25,
      "VesselDwt": 52541,
      "VesselFlag": "SGP",
      "VesselHoldYesNo": "",
      "VesselHoldDescription": "",
      "VesselHoldDate": "0001-01-01T00:00:00",
      "VesselImo": "9726061",
      "Tugprimary": "",
      "VesselLoa": 738.25,
      "VesselNote": "NO THRUSTERS",
      "VesselRestriction": "2 PILOTS NON-DAYLIGHT",
      "VesselRestrictionDate": "1901-01-01T00:00:00",
      "AssignDate": null,
      "AssignDT": "0001-01-01T00:00:00"
    }
  ],
  "Outbound": [
   {
      "VesselName": "SEA BIRD",
      "CombinedDraft": "39.08",
      "CodesDescriptionFrom": "Sun Terminal #3 Hout",
      "CodesDescriptionTo": "SB Buoy",
      "OrderTime": "08:00",
      "StartDate": "01/09",
      "SbbTime": "-",
      "C09Time": "11:09",
      "C930Time": "-",
      "MsqptTime": "-",
      "NriTime": "10:13",
      "CombinedPilots": "S. D. WILLIAMS,<br> C. D. BANCROFT",
      "Sun5Time": "-",
      "ClearTime": "08:40",
      "PilotRestEarned": false,
      "SecondPilotRestEarned": false,
      "ThirdPilotRestEarned": false,
      "HasTransportation": false,
      "PilotHasTransportation": false,
      "SecondPilotHasTransportation": false,
      "ThirdPilotHasTransportation": false,
      "CallSign": "9V2730",
      "Conf": "Due",
      "Confirmed": false,
      "Direction": "OUTBOUND",
      "EstDateOnBoard": "2017-01-09T00:00:00",
      "ExtraYesNo": "N",
      "FirstPilotCode": 30,
      "IsDaylightOnlyJob": false,
      "IsOlder": false,
      "IsTwoPilotJob": true,
      "LastChange": "Daniel Dubois",
      "OnBoardDateTime": "0001-01-01T00:00:00",
      "OnBoardDate": "0001-01-01T00:00:00",
      "OrderDateTime": "2017-01-09T08:00:00",
      "PilotAboardDateTime": "0001-01-01T00:00:00",
      "PilotFinishTime": "0001-01-01T00:00:00",
      "PilotCode": 30,
      "PilotName": "S. D. WILLIAMS",
      "PilotPhone": "409-626-4805",
      "RundownDraftFeet": 39,
      "RundownDraftInches": 1,
      "RundownNotes": "ORDER",
      "SecondPilotCode": 0,
      "SecondPilotName": "C. D. BANCROFT",
      "ThirdPilotCode": 0,
      "ThirdPilotName": "",
      "TimeEstimate": "0800",
      "VesselBeam": 120.25,
      "VesselBredthFeet": 120.25,
      "VesselDwt": 52541,
      "VesselFlag": "SGP",
      "VesselHoldYesNo": "",
      "VesselHoldDescription": "",
      "VesselHoldDate": "0001-01-01T00:00:00",
      "VesselImo": "9726061",
      "Tugprimary": "",
      "VesselLoa": 738.25,
      "VesselNote": "NO THRUSTERS",
      "VesselRestriction": "2 PILOTS NON-DAYLIGHT",
      "VesselRestrictionDate": "1901-01-01T00:00:00",
      "AssignDate": null,
      "AssignDT": "0001-01-01T00:00:00"
    }
  ]
}

 

 

 

Any idea what I could be doing wrong here?

Boyan Dimitrov
Telerik team
 answered on 30 Jan 2017
3 answers
1.3K+ views
Hi all, I need a footer for a kendo window, in the bottom of it, indipendent of vertical scroll. I've tried this approach http://dojo.telerik.com/eGISi/3 (and also using bootstrap class navbar navbar-fixed-bottom) but every time you move the window, the footer it's moved on the bottom of the page, instead of the bottom of the window. This issue is not present if you resize the window.
So I don't understand if is a sort of kendo window strange behaviour or maybe I'm doing wrong the approach.

Any ideas? 
Thanks!
Misho
Telerik team
 answered on 30 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?