Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.1K+ views

Hello all,

i want to reload my dropdown list(filtering and suggest set) after providing some filtering and keep the list open with the results to select from...

The problem is that after setting the datasource with the new values, sometimes the dropdown is closed...

steps:

  1. open Dropdown
  2. type in some filter string
  3. press enter-key
  4. request new data from server
  5. set datasource with new values  ( ddl.setDataSource(new_datalist) )

 Step 5 makes me trouble...

The filtervalue is taken as follows:

var bel = $("#detail-bel").data("kendoDropDownList");
var filterInput = bel.filterInput;
filterInput.keydown(function(e){
if(e.keyCode == 13){
    stopEvent(e);

     loading new data with this.value as filterstring

}

 

Any suggestions?

Thank you...

 

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
2 answers
333 views

Hello,

is there a way to get the id of the pressed action button if using a template?

<script id="fileUploadTemplate" type="text/x-kendo-template">
  <span class='k-progress'></span>
  <div class='file-wrapper'>
    <text class='file-heading file-name-heading'>Name: #=name#</text>
    <text class='file-heading file-size-heading'>Size: #=size# bytes</text>
    <strong class="k-upload-status">
      <span class="k-upload-pct"></span>
      <button type="button" class="k-button k-button-bare k-upload-action">
        <span class="k-icon k-i-close k-delete" title="entfernen"></span>
      </button>
      <button id="BUTTON_TWO" type="button" class="k-button k-button-bare k-upload-action" style="left:-70px;">
        <span class="k-icon k-i-arrow-s k-delete" title="entfernen"></span>
      </button>
    </strong>
  </div>
</script>

 

I want to get the id in the remove function of the widget, so i can pass individual data to the servers "remove"-Action.
The functions event.sender is not the pressed button...

Any way?

The reason why i need it is to have a button for previewing allready uploaded files from this widget dialog...

Thank you,

Richard.

 

Dimiter Madjarov
Telerik team
 answered on 25 Nov 2015
1 answer
60 views

Hi,

I have been looking for a documentation of items() function of kendo grid.

I haven't found it in http://docs.telerik.com/kendo-ui/api/javascript/ui/grid? or its base classes. Where is the function documented?

 

Example of usage http://docs.telerik.com/kendo-ui/web/grid/how-to/Selection/persist-row-selection-while-paging

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
1 answer
172 views

Hello,

Iam trying to make to work simple dropdownlist. Here is a link to example:

http://dojo.telerik.com/EhiCa

 

I want to make it work so the value set to model on scope will be present in textbox of dropdownlist.

Why I need this? I got a form where user can input FirstName, to speed it up for user I have a table with FirstNames ( not having any id as each FirstName is unique ). I dont wnat to use any nested models or data-text-value fields etc. The dropdown needs to be filterable so basicly there can be a case where model have FirstName that doesnt exists in DropDown datasource ( as I filter it using server filtering ). Also I have to use ng-model instead of k-ng-model because I have validation that watches only ng-model.

 I tried many solutions but none of them worked. Is it possible what I am asking for?

Konstantin Dikov
Telerik team
 answered on 25 Nov 2015
2 answers
106 views

Hi,

We recently attempted to upgrade from Kendo 2014.2.716 to 2015.3.1116 and we've experienced several breaking changes along the way. We've resolved everything except for the following issue: when a Kendo Splitter is on an AngularUI modal, it does not render. This worked in the 2014 release, and has since stopped working.

Please see this Dojo for an example: http://dojo.telerik.com/IYOvA/7I've included both sets of scripts, as it is important to use a more modern version of AngularJS than is bundled with the 2014 Kendo release to replicate our environment.

Thanks!

Vladimir Iliev
Telerik team
 answered on 25 Nov 2015
1 answer
94 views

Hi,

I'm using Menu to navigate at this point and initialize it with dynamic data, that depends on the current user logged-in, using this line:

this.Menu.setOptions({ dataSource: $.parseJSON(JSON.stringify(this.BindingSource._tableItem.Rows)) });

What I need is collapsing, so I think to replace the Menu with Toolbar, but can't find a way to initialize the Toolbar at run-time, except to run a series of different add commands...I'm more interested to bind it to some data (JSON)...

How can I do that?

Alexander Valchev
Telerik team
 answered on 25 Nov 2015
3 answers
264 views
Grouping is setup for the kendo grid. When columns are dragged into the grouping area, do you only allow sorting by clicking on the grouping names? Is it possible to also click on column headers and sort?
Iliana Dyankova
Telerik team
 answered on 25 Nov 2015
5 answers
476 views
When I pass the following chart to kendo the value 55% on the value axis is presented as 55.0% instead of as a whole number, this problem happens only at 55% all the other values are shown as whole numbers. Why is Kendo forcing this value have a decimal place of 1? Many thanks,

Peter

``` $scope.chart:  {
  "seriesDefaults": {
    "multiseries": false,
    "type": "column"
  },
  "title": {
    "text": null,
    "align": "left"
  },
  "legend": {
    "position": "top",
    "visible": true
  },
  "series": [
    {
      "color": "#83c774",
      "data": [
        {
          "value": 1.7985
        },
        {
          "value": 101
        },
        {
          "value": 81
        }
      ],
      "name": "Nov 2015",
      "padding": 40
    },
    {
      "color": "#8ed4c4",
      "data": [
        {
          "value": 27
        },
        {
          "value": 121
        },
        {
          "value": 71
        }
      ],
      "name": "Dec 2015",
      "padding": 40
    }
  ],
  "categoryAxis": {
    "categories": [
      "small pancakes",
      "rainbow",
      "Spaghetti Colours"
    ],
    "labels": {
      "rotation": 315
    }
  },
  "valueAxis": {
    "min": 0.5,
    "max": 0.9,
    "title": {
      "text": null
    },
    "labels": {
      "format": "{0:#.#%}"
    }
  },
  "tooltip": {
    "format": "{0:#.#%}",
    "visible": true
  }
} ```
EZ
Top achievements
Rank 2
 answered on 24 Nov 2015
9 answers
1.1K+ views
Here is the situation. I have a table which contains columns of the following form: ItemTypeId, StringValue1, StringValue2, StringValue3, DecimalValue1, DecimalValue2, DecimalValue3, DateValue1, DateValue2, DateValue3, etc..etc...

Then I have a metadata table which maps certain fields to certain Item Types:
ItemTypeId: 1
FieldName: Description
FieldType: text
TargetField: StringValue1

What I want is for the declared fields to appear in the Detail Template for the Grid rows. I've tried to emulate the markup for the popup editor, and generated the following attempt at a proof of concept:

$(document).ready(function () {
    $("#mainGrid").kendoGrid({
        dataSource: itemSource,
        toolbar: ["save"],
        columns: [
            { field: "Id", title: "Id" },
            { field: "Description", title: "Description" }
        ],
        detailTemplate: kendo.template($("#details").html()),
        detailInit: detailInit,
        editable: true
    });
});

function detailInit(e) {
    var detailRow = e.detailRow;
    var container = e.detailRow.find(".k-edit-form-container");
    fieldSource.fetch(function () {
        fieldSource.filter({ field: "ItemTypeId", operator: "eq", value: e.data.Id });
        var data = this.view();
        for (var i = 0; i < data.length; i++) {
            var field = data[i];
            // Create Label
            $("<div class='k-edit-label'><label for='" + field.TargetField + "'>" + field.FieldName + "</label>").appendTo(container);
            // Create Data Entry Field
            var div = $("<div />");
            div.attr("data-container-for", field.TargetField);
            div.attr("class", "k-edit-field");
            div.appendTo(container);
            if (field.FieldType == "text") {
                var input = $("<input />");
                input.attr("name", field.TargetField);
                input.attr("type", "text");
                input.attr("class", "k-input k-textbox");
                input.attr("data-bind", "value:" + field.TargetField);
                input.appendTo(div);
            }
            if (field.FieldType == "decimal") {
                var input = $("<input />");
                input.attr("name", field.TargetField);
                input.attr("data-bind", "value:" + field.TargetField);
                input.appendTo(div);
                input.kendoNumericTextBox();
            }
        }
    });
}

However the details section does not seem to end up bound to the relevant fields. It correctly lists the controls that should contain the data for each item, but it neither shows the initial value in those fields, nor does it register edited values and save them when Save Changes is clicked.

What am I doing wrong here? Is what I am attempting to do feasible with the Kendo framework?
Alexander Valchev
Telerik team
 answered on 24 Nov 2015
1 answer
109 views

Using a data field that starts with a number prevents the chart from rendering. Numbers can be used within the field but apparently not at the very beginning.

Is there a workaround for this?

This is an example:

 var stats = [

                    { 1result1: 30, result2: 20, date: new Date("2011/12/20") },
                    { 1result1: 50, result2: 20, date: new Date("2011/12/21") },
                    { 1result1: 30, result2: 20, date: new Date("2012/01/05") }
                ];

Change 1result1 to result1 and everything works fine.

http://dojo.telerik.com/aMIjE

 

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 24 Nov 2015
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?