Telerik Forums
Kendo UI for jQuery Forum
1 answer
262 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
576 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.4K+ 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
1 answer
144 views

Hi,

We recently upgraded from 2016 R2 to the latest 2017 R1 and noticed a change in the editor toolbar behavior.   We insert a kendo combobox into the editor toolbar as a custom tool.  Prior to upgrading we could click on the combobox, it would allow focus and we could type into the combobox, filtering the list of options.  Now when clicking the combobox it does not allow focus.  This seems like the editor is preventing focus on-click as we see this behavior for the built it comboboxes (font and font size).

Is this an intended change?  If so, how can we allow focus to our combobox?  Thanks,

 

Randy

Ianko
Telerik team
 answered on 30 Jan 2017
9 answers
643 views

Hi I am working with Kendo scheduler with AngularJS. Only month view is activated. Sometime I am facing a problem which one I can not reproduce always. Upon double clicking on any date I am going to date edit page(diff html same controller). I am editing some thing there and after saving, coming back to scheduler. From the edit page, I can back to scheduler without editing anything. When I just coming back to scheduler without editing/saving anything sometime I found that date selection is not correct. For example, If I click 5 Jan, 4 Jan is being selected, If I click 28 FEB then 27 Feb is being selected. For the first date of each week (First cell of each row) is being selected correctly. Any Idea?
Here is my scheduler option

             $scope.schedulerOptions = {
                date: stDt   ,
                startTime: stDt,
                min: $scope.minDate,
                max: $scope.maxDate,
                height: 750,
                autobind: true,
                views: [
                    {
                        type: "month"
                    }
                ],
                timezone: "Etc/UTC",
                dataSource:  $scope.tmpltDS,
                editable: false,
                selectable: true,
                change: scheduler_change,
                dataBound: scheduler_dataBound
            };

Vladimir Iliev
Telerik team
 answered on 30 Jan 2017
5 answers
2.1K+ views
Is there any way to set the first day of week for kendoDatePicker?

Thanks.
Grünther
Top achievements
Rank 1
 answered on 30 Jan 2017
1 answer
74 views
All my Kendo controls are showing fixed width on page resize , they are not shrinking in size and fonts as well. Am including all required kendo bootstrap styles.
Marin Bratanov
Telerik team
 answered on 30 Jan 2017
1 answer
1.3K+ views
I am trying to build an ASP.NET 4 MVC web service using kendo UI in which I have the following requirements 

 1. posting data in a kendo Window. The kendo Window will contain a form. (I am trying to achieve this using iframe.)
 2. and retrieving back the updated data from the form. 

Home.cshtml

    <div id="actionFormWindow"></div>

TriageForm.cshtml

    @model BugViewModel
    <form>
      //display the model data
    </form>
    <button class="k-button" id="okButton">Ok</button>
    <button class="k-button" id="cancelButton">Cancel</button>

JavaScript

    var dataItem = {
        "Date": "2016-12-31",
        "Id": "1234-csj4-sadf-random",
        "Scenario": "abc",
        "IsFixed": "No"
     };

    var bugActionFormWindow = $("#actionFormWindow")
        .kendoWindow({
            title: "Please confirm the details",
            visible: false, 
            modal: true,
            actions: ["Maximize", "Close"],
            width: "700px",
            height: "500px",
            iframe: true
        }).data("kendoWindow");

    bugActionFormWindow.refresh({
        url: "/bugTriage/triageform",
        data: dataItem,
        dataType: "json"
    });

    bugActionFormWindow.center().open();

Controller.cs

    public ActionResult TriageForm(BugViewModel vm) {

            return this.View(vm);
    }

BugViewModel.cs

    public class BugViewModel{
       public string Date {get; set;}
       public string Id {get; set;}
       public string Scenario {get; set;}
       public string IsFixed {get; set;}
    }

The data in the controller is null. Please suggest if I am doing anything wrong. Also I am unaware how can I get the updated data in the `Home` view. Kendo Window refresh documentation says it "Returns the window object to support chaining". But I can't understand how to get the return value.
Tsvetina
Telerik team
 answered on 30 Jan 2017
1 answer
126 views

Hi,

I tried to use Kendo-ui-react-jquery-diagram component, but i found an issue when requiring kendo.dataviz.diagram :

var _kendoDatavizDiagram = require('kendo/js/kendo.dataviz.diagram.js') ==> returns empty object.

How can i fix this problem ?

Thanks

Vessy
Telerik team
 answered on 30 Jan 2017
4 answers
910 views

Hello,

I wanted to update my TreeView control which uses a HierarchicalDataSource after I updated the array it uses.

You can see the fiddle here: https://jsfiddle.net/ZoolWay/gev9zj4j/

How can I update/refresh my TreeView after adding items? Changing a text works this way...

// how the datasource is configured:
var myData = ... // already contains two items, one with subitems
var myDataSource = new kendo.data.HierarchicalDataSource({
      data: myData
    });
 
// add item to the array:
myData.push({ 'id': 3, 'text': 'Item 3'});     
 
// read the updated array
myDataSource.read();
Alex Hajigeorgieva
Telerik team
 answered on 30 Jan 2017
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?