Telerik Forums
Kendo UI for jQuery Forum
10 answers
519 views

Using the HTML5 verison of Kendo UI in a grid. Many grid cells need a DropDownList, which I can populate with data no problem.

I cannot however filter the second DropDownList based off the first one. I have been through all the examples but nothing works.

I need to understand why my second dropdown is not filtering from the first one. What am I doing wrong?

 

001.function loadNigoIssueGrid(frm) {
002.        var legendText = "grdNigoIssueDelv";
003.        grd = plUtil.initGrid(legendText, frm, "3px");
004.        var modelData = gridData;
005.        var dataSource = new kendo.data.DataSource({
006.            transport: {
007.                read: function (e) {
008. 
009.                    var dsData = modelData;
010.                    e.success(dsData);
011.                },
012.                destroy: function (e) {
013.                    e.success();
014.                }
015. 
016.            },
017.            batch: true,
018.            schema: {
019.                data: "nonRiskRequirements",
020.                model: {
021.                    fields: {
022.                        WorkType: { type: "string" },
023.                        SubType: { type: "string"},
024.                        Name: {  },
025.                        Reason: {  },
026.                        Notes: {  },
027.                        Result: {  },
028.                        Critical: {  type: "boolean" },
029.                        Applicant: { type: "boolean" },
030.                        Insured: {  type: "boolean" },
031.                        Policyowner: { type: "boolean" },
032.                        Payor: {  type: "boolean" },
033.                        Producer: {  type: "boolean" },
034.                        ProviderName: {  }
035.                    }
036.                }
037.            }
038.        });
039.        grd.kendoGrid({
040.            columns: [
041.                { field: "WorkType", title: "Work Type", width: "134px", editor: workTypeDropDown },
042.                { field: "SubType", title: "Sub Type", width: "134px", editor: issueSubTypeDropdownList },
043.                { field: "Name", width: "134px" },
044.                { field: "Reason", width: "136px", editor: bindReasonTypeDropDown, template: "#=Reason#" },
045.                { field: "Notes", width: "136px" },
046.                { field: "Result", width: "136px" },
047.                { field: "CriticalFlag", width: "136px", template: '#if (CriticalFlag) {#<input type="checkbox" #= CriticalFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
048.                { field: "RequiredSignatureApplicantFlag", width: "136px", template: '#if (RequiredSignatureApplicantFlag) {#<input type="checkbox" #= RequiredSignatureApplicantFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
049.                { field: "RequiredSignatureInsuredFlag", width: "136px", template: '#if (RequiredSignatureInsuredFlag) {#<input type="checkbox" #= RequiredSignatureInsuredFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
050.                { field: "RequiredSignaturePolicyOwnerFlag", title: "Policy Owner", width: "136px", template: '#if (RequiredSignaturePolicyOwnerFlag) {#<input type="checkbox" #= RequiredSignaturePolicyOwnerFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
051.                { field: "RequiredSignaturePayorFlag", width: "136px", template: '#if (RequiredSignaturePayorFlag) {#<input type="checkbox" #= RequiredSignaturePayorFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
052.                { field: "RequiredSignatureProducerFlag", width: "136px", template: '#if (RequiredSignatureProducerFlag) {#<input type="checkbox" #= RequiredSignatureProducerFlag ? "checked=checked" : "" # class="chkbx"></input>#}#' },
053.                { field: "ProviderName", title: "Provider Name", width: "136px" },
054.                { command: [{ text: "Delete", className: "pl-grid-delete-command", template: "<a class='k-button k-button-icontext pl-grid-delete-command'><span class='k-icon k-delete'></span>Delete</a>" }], width: "100px" }
055. 
056.            ],
057.            dataSource: dataSource,
058.            sortable: { allowUnsort: false },
059.            filterable: true,
060.            selectable: "row",
061.            scrollable: true,
062.            editable: true,
063.            toolbar: [
064.            { name: "Add", className: "k-grid-addWork", id: "k-grid-addWorks" },
065. 
066.             
067. 
068.            ],
069.            change: function (e) {
070.            }
071.        });
072.    }
073. 
074.    var workTypeDataSource = [
075.            { DisplayText: "NIGO", WorkType: 1 },
076.            { DisplayText: "ISSUE", WorkType: 2 },
077.            { DisplayText: "DELV", WorkType: 3 }
078.        ];
079. 
080.    var workSubType = [
081.            { DisplayText: "BUSJU", WorkType: 1 },
082.            { DisplayText: "GENERAL", WorkType: 1 },
083.            { DisplayText: "HIPAA", WorkType: 1 },
084.            { DisplayText: "ILLUSTRATN", WorkType: 1 },
085.            { DisplayText: "MEDINFO", WorkType: 1 },
086.            { DisplayText: "QUOTE", WorkType: 1 },
087.            { DisplayText: "REG60", WorkType: 1 },
088.            { DisplayText: "RELEASE", WorkType: 1 },
089.            { DisplayText: "REPLACEMNT", WorkType: 1 },
090.            { DisplayText: "TIA", WorkType: 1 },
091.            { DisplayText: "TICKET", WorkType: 1 },
092.            { DisplayText: "EFT", WorkType: 3 },
093.            { DisplayText: "GENERAL", WorkType: 3 },
094.            { DisplayText: "HIV", WorkType: 3 },
095.            { DisplayText: "ILLUSTRATN", WorkType: 3 },
096.            { DisplayText: "MEDICAL", WorkType: 3 },
097.            { DisplayText: "PREMALLOC", WorkType: 3 },
098.            { DisplayText: "QUOTE", WorkType: 3 },
099.            { DisplayText: "SIGNAMEND", WorkType: 3 },
100.            { DisplayText: "SIGNAPP", WorkType: 3 },
101.            { DisplayText: "SIGNAPP2", WorkType: 3 },
102.            { DisplayText: "SIGNAVIATN", WorkType: 3 },
103.            { DisplayText: "SIGNAVOCTN", WorkType: 3 },
104.            { DisplayText: "SIGNRECPT", WorkType: 3 },
105.            { DisplayText: "SIGNTRAVEL", WorkType: 3 },
106.            { DisplayText: "SOH", WorkType: 3 },
107.            { DisplayText: "TRUST", WorkType: 3 },
108.            { DisplayText: "GENERAL", WorkType: 2 },
109.            { DisplayText: "ILLUSTRATN", WorkType: 2 },
110.            { DisplayText: "QUOTE", WorkType: 2 },
111.            { DisplayText: "SOH", WorkType: 2 },
112.            { DisplayText: "SUITBLTY", WorkType: 2 }
113.        ];
114. 
115.    function workTypeDropDown(container, options) {
116.        jq('<input name="WorkType" id="WorkType" data-text-field="DisplayText" data-field-value="DisplayText" data-bind="value:' + options.field + '"/>')
117.            .appendTo(container)
118.            .kendoDropDownList({
119.                dataSource: workTypeDataSource,
120.                dataTextField: "DisplayText",
121.                dataValueField: "DisplayText"
122.            });    
123.    }
124. 
125.    function issueSubTypeDropdownList(container, options) {
126.        jq('<input name="SubType" data-text-field="DisplayText" data-field-value="DisplayText" data-bind="value:' + options.field + '"/>')
127.            .appendTo(container)
128.            .kendoDropDownList({
129. 
130.                dataSource: workSubType,
131.                dataTextField: "DisplayText",
132.                dataValueField: "DisplayText",
133.                cascadeFrom: "WorkType"
134.            });
135.    }

Peter Milchev
Telerik team
 answered on 03 Oct 2016
1 answer
1.6K+ views

I'm having trouble getting the read using a POST in a kendo.data.DataSource working.  It works fine for me using jQuery's $.ajax function, but not in the transport.read of Kendo's DataSource.

Here is the code running:

http://jsfiddle.net/jmowox1k/1/

It makes two Ajax calls, the first using jQuery way and the second using the Kendo way.  It sends the data as "application/x-www-form-urlencoded; charset=UTF-8".

The submitted form data is:

PropertyNumber=123&Address=1313+Mockingbird+Lane&AtRisk=Yes&FuelFacility=No&PropertyName=The+Munsters&City=Los+Angeles&Rec=Yes&DryCleaner=No&DCType=2&State=CA&OngoingEnv=1&ProjectType=2

I've attached two screenshots of Chrome's Developer Tools.  Using jQuery, it looks perfect, but using the Kendo DataSource, it's all mangled.

I guess I can just use the jQuery way and everything would fine, but I want to understand why recommended way doesn't work.

What am I doing wrong?

 

Stefan
Telerik team
 answered on 03 Oct 2016
5 answers
440 views
Hello,
Telerik team,

I am facing an issue while I am setting the maximum and minimum value of the slider, If i set minimum value as 0 and maximum value as 40000000 the page doesn't load at all. Here is the code below :

 var MInvestmentTarget = $("#MInvestmentTarget").kendoSlider({   
                    min: 0,
                    max: 40000000,
                    tickPlacement: "none",
                    showButtons: false
                }).data("kendoSlider"),
                    MInvestmentTarget = function (e) {
                        if (e.type != "keypress" || kendo.keys.ENTER == e.keyCode) {
                            var value = parseInt($("#InvestmentTargettxtBoxValue").val());
                            if (isNaN(value) || value < 0 || value > 40000000){
                                alert("Value must be a number between 0 and 40000000");
                                return;
                            }
                            MInvestmentTarget.value(value);
                        }
 }; 

The page takes a long time to load in any of the browser and finally it crashes.

If I give the maximum value as 4000000, it works perfectly fine. The page loads properly.

So I want to know if there is a limit on the Maximum value that can be given for the slider ?
Or is it a mistake in the code which is causing this error.

Awaiting your response

Thanks 
Pavan
                   
Tony
Top achievements
Rank 1
 answered on 03 Oct 2016
4 answers
168 views

Using even the published demo code at demos.telerik.com, I cannot shift-tab out of a toolbar control.  This can be reproduced at http://demos.telerik.com/kendo-ui/toolbar/index:  get the focus inside the toolbar and press tab to go forward through the buttons, eventually exiting the toolbar and on to other items.  Again, put the focus in the toolbar and use shift-tab to move backwards through the elements.  The focus reaches the first button and stops - it won't shift-tab out.  

In my product's code, I experience almost the same, except the shift-tabbing seems to stop at the second button in the toolbar, not the first as seen in the demo.

Ivan Danchev
Telerik team
 answered on 03 Oct 2016
1 answer
141 views

Hi,

I am looking for an example on the syntax of a  kendo mvvm dependant(computed) observable when used in type script. 

Have not been able to find this anywhere.

 

Best regards

Ole

 

Stefan
Telerik team
 answered on 03 Oct 2016
1 answer
135 views

This started sometime late 2015 from what I can tell on the dojo page. It doesn't make sense and looks strange.

http://dojo.telerik.com/udIHI

Georgi Krustev
Telerik team
 answered on 03 Oct 2016
2 answers
695 views

I have a html/javascript chart which I populate via an ajax call. On dataBound, i resize the chart xAxis max and draw plotbands based on the values bound to the grid. Unfortunately, the setOptions call seems to then fire the dataBound event again... and around and around it goes in an endless loop. I got around this by setting a flag so that it only processes the first time. However, the issue I now face is that when I pull new data into the chart later (say because the user expanded the data ranges), i cant reset that flag and let it fire the code in the dataBound event. So, when the user expands the date ranges there is a good chance that my poltbands and axiscrossing settings will be wrong. Any advice?  See below for code...

 

$.ajax({
        type: "POST",
        data: JSON.stringify({
            startDate: $('#txtDateRangeFilter').data('daterangepicker').startDate,
            endDate: $('#txtDateRangeFilter').data('daterangepicker').endDate
        }),
        url: "/User/EChart",
        contentType: "application/json",
        dataType: 'json'
    })
        .done(function (data) {
            var plotbandloaded = false;

            $('#currentDuration').text(Math.round(data.userGoalDetails.DurationHours * 100) / 100 + " hrs");
            $('#goalDuration').text(Math.round(data.userGoalDetails.Goal * 100) / 100 + " hrs");
            $("#chartE").kendoChart(
            {
                dataSource: {
                    data: data.userActivity
                },
                sort: {
                    field: "CreateDateTime",
                    dir: "asc"
                },
                title: {
                    text: ""
                },
                legend: {
                    position: "bottom"
                },
                chartArea: {
                    background: "",
                    width: 300,
                    height: 190
                },
                seriesDefaults: {
                    type: "line",
                    style: "smooth"
                },
                series: [
                    {
                        field: "Minutes",
                        name: "Minutes",
                        axis: "Minutes",
                        color: "#4D4D4D",
                        type: "column"
                    }, {
                        name: "Count",
                        field: "Count",
                        axis: "Count",
                        color: "#00B5A3",
                        type: "line"
                    }
                ],
                valueAxes: [{
                    name: "Minutes",
                    color: "#4D4D4D"
                }, {
                    name: "Count",
                    color: "#00B5A3"
                }],
                categoryAxis: {
                    field: "Day",
                    majorGridLines: {
                        visible: false
                    },
                    axisCrossingValues: [0, 50],
                    labels: {
                        rotation: "auto"
                    }
                },
                tooltip: {
                    visible: true,
                    format: "{0}%",
                    template: "#= series.name #: #= value #"
                },
                dataBound: function (e) {
                    setTimeout(function () {
                        if (plotbandloaded == false) {
                            var goal = Math.round((data.userGoalDetails.Goal * 60) * 100) / 100;
                            var goalTo = goal + (goal * .025);
                            var setMax = goal + (goalTo * .15);
                            var chart = $('#chartE').data("kendoChart");
                            var axisCrossing = chart.options.series[1].data.length + 1;
                            var options = {
                                valueAxes: [{
                                        name: "Minutes",
                                        color: "#4D4D4D",
                                        max: setMax,
                                        plotBands: [{
                                            from: goal,
                                            to: goalTo,
                                            color: "#c00",
                                            opacity: 0.3
                                        }]
                                    }, {
                                        name: "Count",
                                        color: "#00B5A3"
                                    }],
                                categoryAxis: { axisCrossingValues: [0, axisCrossing] }
                                };

                            plotbandloaded = true;
                            chart.setOptions(options);
                        };
                    }, 100)
                }
            });

        });

Dimo
Telerik team
 answered on 03 Oct 2016
1 answer
210 views

Hi, 

I have been using the column menu to filter/choose columns to display in my grid and have been greatly pleased with the results.  However, I would like to add a second custom menu item to the column menu that has the functionality of the column menu, but the choices are determined differently...

 

so say my columns are human names, Aaron, Andrew, Dave, Dorothy, Evan, Eric.  Currently in the "columns" section of the menu, I can select which of those 6 I would like to display.  Is it possible to add a second menu item that will contain choices 'A', 'D', and 'E' as checkboxes and will display those columns starting with the respective letter? 

Hopefully that was clear enough.  Thanks for the help!

Dimiter Madjarov
Telerik team
 answered on 03 Oct 2016
1 answer
81 views

I am using the kendo UI with the following version Kendo UI v2016.2.714.

I have a kendo grid with add, update and delete buttons, these functionalities are working fine in all the latest browsers except IE11.

Do i need include anything to make it work for these button events or any other ways to get this done.

 

Rumen
Telerik team
 answered on 03 Oct 2016
1 answer
241 views

Hi,

Is anybody seeing the "blank context menu issue" in the spreadsheet? The menu contains 4 items (Cut, Copy, Paste and Merge) but they are not visible unless you hover over them

And the Cut, Copy and Paste commands don't work anyway, they cause a "do not use this function" message. See http://screencast.com/t/lsHfeO8FT

This is happening with the Q3 2016 release in Chrome, Edge and IE 11.

 

Mike Wiese

Rumen
Telerik team
 answered on 30 Sep 2016
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?