Telerik Forums
Kendo UI for jQuery Forum
2 answers
392 views

I am currently trying to see if the diagram component is useful for a feature we are trying to implement. So far it looks great, however, there is one issue that is stopping me….

http://demos.telerik.com/kendo-ui/diagram/editing

The problem I am having is when I click on President in your example, I want a set of options in a dropdown, not a free text field.

I would also like the option to have two dropdowns so the top one filters the options in the bottom one.

Is this possible? If so, would you be able to show me or point me in the correct direction? I am using the MVC wrappers.

Thanks

X
Top achievements
Rank 1
 answered on 19 May 2017
1 answer
76 views

When using the mobile version of the scheduler month view, calendar items involving more than one day appear as a dot on the first day of the time period, but not on all the days involved.

Is there a way to display a dot on every day containing the event?

To create a separate event for all involved days is not an appropriate solution as this does not reflect the data properly. So the question is about a way to visualize this.

Thanks beforehand

Dimitar
Telerik team
 answered on 19 May 2017
1 answer
608 views

I've been using the Kendo DataSource for a while now on the browser side, so I've gotten used to all of its great features.  I want to use it on the server side in a Node.js app.  Is this even possible?

I installed kendo-ui-core because I don't care about any of the other pro features, just the DataSource.

npm install --save kendo-ui-core

 

when I do

var kendo = require("kendo-ui-core");

I get a "ReferenceError: window is not defined" which leads me to believe that it's not possible since it's trying to use the window object which is not available in Node.

Dimitar
Telerik team
 answered on 19 May 2017
1 answer
255 views
I attached a file for testing the case. It's related to Kendo Date Pickers using Bootstrap modals in an MVC architecture.
First, I've included 2 datePickers. They work as expected. No problems related to using multiple controls. It also means all styles and scripts are loaded fine.
But when I add a third control in a Bootstrap modal, it looks completely different.
When analyzing the DOM, this control is rendered as a text input with the right date, but... No possibilities to use the selector that should appear as a pop up.

Thanks in advance for any help.
Stefan
Telerik team
 answered on 19 May 2017
1 answer
155 views

Hi all,

I have been fighting with the scheduler (2017.2.504) for the past few days. I'm simply trying to get two very simple events from my ASP.NET Core WebAPI.

You may find below the configuration of my kendo scheduler:

$('#scheduler').kendoScheduler({
       date: new Date(),
       dataSource: {
           batch: true,
           schema: {
               model: {
                   id: 'bookingId',
                   fields: {
                       bookingId: { type: 'number', from: 'bookingId' },
                       start: { type: 'date', from: 'start' },
                       end: { type: 'date', from: 'end' },
                       title: { from: 'title' },
                       resourceId: { type: 'number', from: 'resourceId' }
                   }
               }
           },
           transport: {
               read: {
                   url: 'http://localhost:57627/api/v1.0/bookings',
                   dataType: 'jsonp'
               },
               parameterMap: function (options, operation) {
                   if (operation === 'read') {
                       // Default values
                       return { start: '2017-05-01', end: '2017-05-31', tectaclocationid: 'locations/801' };
                   } else if (operation !== 'read' && options.models) {
                       return { models: kendo.stringify(options.models) };
                   }
                   return null;
               }
           }
       },
       resources: [{
           field: 'resourceId',
           dataValueField: 'resourceId',
           dataTextField: 'code',
           name: 'Resources'
           dataSource: this.resources
       }]
   });

 

I'm able to confirm that the "bookings" endpoint is correctly called by the scheduler. It always returns the following JSON array:

[{"bookingId":1111,"start":"2017-05-19T06:00:00","end":"2017-05-19T07:00:00","resourceId":1227756,"title":"Test 1"},{"bookingId":2222,"start":"2017-05-19T08:00:00","end":"2017-05-19T09:00:00","resourceId":1227756,"title":"Test 2"}]

 

My resources are correctly loaded (i can see them) but i'm unable to load/see those events. I tried to change the date format, the resourceId, the title without success. I'm probably missing something big :)...

Any idea? 

Thank you so much

Jason
Top achievements
Rank 1
 answered on 19 May 2017
1 answer
286 views

kendoMaskMaskedTextBox 이벤트를 통해 검도 그리드의 값을 변경하고 싶지만 enter 이벤트 

작동하지 않습니다 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor}
 
 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options);
          }
      });
};

 

var assignRoom = function(obj) {
        angular.forEach($scope.gridSource.data(), function(v, k) {
            if (v.roomNum === obj.roomNum) {
                if (v.rsvDtlsId !== obj.rsvDtlsId) {
                    v.roomNum = "";
                }
            }              
        });
        var idx = 0, delRoom = null;
        angular.forEach($scope.gridModel, function(v, k) {
            if (v.rsvDtlsId === obj.rsvDtlsId) {
                if (obj.roomNum === "") {
                    delRoom = v.roomNum;
                }
 
                v.roomNum = obj.roomNum;
                idx = k;
            }              
        });
 
        angular.forEach($scope.checkedModel.roomNum, function(v, k) {
            if (v === delRoom) {
                $scope.checkedModel.roomNum[k] = "";
            }              
        });
 
 
        angular.forEach($scope.assignModel, function(v, k) {
            if (v.roomNum === $scope.gridModel[idx].roomNum) {
                $scope.checkedModel.roomNum[idx] = v.roomNum;
            }              
        });
         
        $scope.saveEach(obj);
        $scope.$apply();
    };

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};

kendoMaskedTextBox evnet을 통해 검도 그리드의 값을 변경하고 싶습니다. 그러나 엔터 이벤트가 작동하지 않습니다. 어떻게 변환합니까?

{field: "roomNum", title: "Room #", width: "150px", attributes:{style:"text-align:center;"},editor: dateEditor} 

 function dateEditor(container, options) {
      $('<input data-text-field="' + options.field + '" data-value-field="' + options.field + '" data-bind="value:' + options.field + '"/>')
      .appendTo(container)
      .kendoMaskedTextBox({
          change: function(e){
              var model = options.model;
              assignRoom(model);
             console.log('options-->', options); 
          }
      }); 
};
Georgi
Telerik team
 answered on 18 May 2017
1 answer
1.2K+ views
I'm writing a universal function that will apply a standard context menu to every single grid on our whole site. My problem is, I'm trying to also universally bind the option to export all pages and cannot find any documentation on how to apply it via the saveAsExcel function. Here is my JS function


function Universal_Grid_ContextMenu(grid) {
     
    $("#context-menu").kendoContextMenu({
        target: grid,
        select: function(e) {
            var element = e.item;
            var grid = $(e.target).data("kendoGrid");
            var action = $(element).attr("data-action");
             
            if(action != undefined && grid !=undefined) {
                 
 
                    switch(action) {
                            case "grid_menu_export":
                                grid.bind("excel", function(e) {
                                        e.workbook.allPages = true
                                });
                                 
                                grid.saveAsExcel();
                             
                            break;
                            case "grid_menu_refresh":
                                grid.dataSource.read();
                                grid.refresh();
                            break;
                    }
                     
                 
            }
            console.log();
 
             
        }
    });        
     
}
Jeff
Top achievements
Rank 1
 answered on 18 May 2017
1 answer
1.3K+ views
Currently we have an example of One level hierarchical Grid but i need Multi Level Hierarchical Grid. Please provide me the Link for Demo of Multi Level hierarchical grid. Thank you.

Dimitar
Telerik team
 answered on 18 May 2017
5 answers
444 views
I can't display in a kendo grid the data that I am returning from my Controller as Json Result.


     
  [HttpPost]
  public ActionResult PermitSearch(BptSearchViewModel viewModel)
  {
    var data = appService.SearchPermitInspection(viewModel);
 return Json(data, JsonRequestBehavior.AllowGet);<br>        }


now from my View I am submitting the information using ajax

      @using (Ajax.BeginForm("PermitSearch", "Home", null, new AjaxOptions
      {
            HttpMethod = "post",
            InsertionMode = InsertionMode.InsertAfter,
            UpdateTargetId = "search-results-grid",
            OnComplete = "OnCompleteMethod"
      }))
      {
               ....
      }

    <div id="search-results-grid"></div>

an the script with the OnCompleteMethod is below

    function OnCompleteMethod(dataq, status) {
        if (status === "success") {
            $("#search-results-grid").kendoGrid({
                columns: [
                    {
                        field: "jobname",
                        title: "Job Type"
                    }
                dataSource: {
                    data: {
                        "items" : dataq
                    },
                    schema: {
                        data: "items"
                    }
                },
                groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true,
                    buttonCount: 5
                },
                noRecords: {
                    template: "No data available on current page. Current page is: #=this.dataSource.page()#"
                }
            });
        }
    }
 
and the data that I am returning looks like this after I call the controller

    [
      {
        "jobname": "job1"
      },
      {
        "jobname": "job2"
      }
    ]

What I am doing wrong here?
Viktor Tachev
Telerik team
 answered on 18 May 2017
2 answers
218 views
I can't display in a kendo grid the data that I am returning from my Controller as Json Result.


        
[HttpPost]
public ActionResult PermitSearch(BptSearchViewModel viewModel)
{
    var data = appService.SearchPermitInspection(viewModel);
     
    return Json(data, JsonRequestBehavior.AllowGet);
}


now from my View I am submitting the information using ajax

      
@using (Ajax.BeginForm("PermitSearch", "Home", null, new AjaxOptions
      {
            HttpMethod = "post",
            InsertionMode = InsertionMode.InsertAfter,
            UpdateTargetId = "search-results-grid",
            OnComplete = "OnCompleteMethod"
      }))
      {
               ....
      }
 
    <div id="search-results-grid"></div>

an the script with the OnCompleteMethod is below

function OnCompleteMethod(dataq, status) {
    if (status === "success") {
        $("#search-results-grid").kendoGrid({
            columns: [
                {
                    field: "jobname",
                    title: "Job Type"
                }
            dataSource: {
                data: {
                    "items" : dataq
                },
                schema: {
                    data: "items"
                }
            },
            groupable: true,
            sortable: true,
            pageable: {
                refresh: true,
                pageSizes: true,
                buttonCount: 5
            },
            noRecords: {
                template: "No data available on current page. Current page is: #=this.dataSource.page()#"
            }
        });
    }
}
 
and the data that I am returning looks like this after I call the controller

    
[
      {
        "jobname": "job1"
      },
      {
        "jobname": "job2"
      }
    ]


What I am doing wrong here?
Georgi
Telerik team
 answered on 18 May 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?