Telerik Forums
Kendo UI for jQuery Forum
4 answers
196 views
Hello,
Is it possible to allow the user to resize the columns by dragging the edges of their header cells (this feature works with a grid)?

Thanks,
Luc
Luc
Top achievements
Rank 1
 answered on 16 Feb 2015
4 answers
178 views
Hi
I want to load the initial first page of a grid using the first page of data bound from a server side collection.  Subsequent page changes should be loaded using ajax. 

My problem is how to set the total records of the collection to a number so that the correct number of pages are displayed.

So in the example below, Model.Calls may only contain 20 records, but the full collection count could be 100.  How can I tell the grid there are in fact 100 records, not 20?

@(Html.Kendo().Grid<CallsViewData>(Model.Calls)
      .Name("CallsGrid")
      .Columns(c => {
                        c.Bound(m => m.TestResultId).Groupable(false).Title(@Html.Resource("HeadTestResultId"));
                        c.Bound(m => m.RunType).Title(@Html.Resource("HeadType"));
                        c.Bound(m => m.CallFlow).Title(@Html.Resource("HeadDirection"));
                        c.Bound(m => m.PhoneNo).Title(@Html.Resource("HeadCalledNo"));
                        c.Bound(m => m.ActualStart).Title(@Html.Resource("HeadStartDate"));
                        c.Bound(m => m.Connected).Title(@Html.Resource("HeadConnectedDate"));
                        c.Bound(m => m.Disconnected).Title(@Html.Resource("HeadDisconnectedDate"));
                        c.Bound(m => m.Duration).Title(@Html.Resource("HeadDuration"));
                        c.Bound(m => m.Duration).Title(@Html.Resource("HeadMinutes"));
      })
      .Resizable(s => s.Columns(true))
      .Pageable()
      .DataSource(ds => ds.Server().Total(100))
      .BindTo(Model.Calls)
      .Sortable()
      .Scrollable()
      .DataSource(dataSource => dataSource
                                    .Ajax()
                                    .Read(read => read.Action("calls", "report").Data("tt").Type(HttpVerbs.Post    ))
                                    .PageSize(20)
      ))
Josh
Top achievements
Rank 1
 answered on 13 Feb 2015
3 answers
317 views
According to this demo. http://demos.telerik.com/kendo-ui/map/geojson
Is there any method I can call to display the numbers in the tooltips for each countries area program?

 The requirements of my project is like when end user selected row in the grid, it should highlight the country area and show the number in the tool tip on map.
See the attachment.

Thanks.
Congyuan
Top achievements
Rank 1
 answered on 13 Feb 2015
1 answer
111 views
kendo.bind has an optional namespace 3rd param. However the typescript bindings in kendo.web.d.ts declare this 3rd param as required.

This means when using Typescript kendo.bind you always have to provide a namespace param, which is annoying.
Alex Gyoshev
Telerik team
 answered on 13 Feb 2015
4 answers
200 views
I have the following data structure:

{
        "Id": "568124DB-8702-4717-A4C5-CF069A4B0491",
        "Hive": "global",
        "HiveQualifier": null,
        "Name": "OpenCycle OSM",
        "Description": "OpenStreetMap layer from opencyclemap.org",
        "Type": "OSM",
        "IsBaseLayer": true,
        "Params": {
            "url": [
                "http://a.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
                "http://b.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png",
                "http://c.tile.opencyclemap.org/cycle/${z}/${x}/${y}.png"
            ]
        }
}

I'm editing it with the following template (in a grid if it matters):
<script id="map-layer-editor" type="text/x-kendo-template">
<table style="width: 100%;border-collapse: separate;border-spacing: 10px;">
<tr>
<td class="label-cell"><label>Name</label></td>
<td><input type="text" class="k-input k-textbox" style="width: 100%;" name="Name" ng-model="dataItem.Name"></td>
</tr>
<tr>
<td class="label-cell"><label>Description</label></td>
<td><input type="text" class="k-input k-textbox" style="width: 100%;" name="Description" ng-model="dataItem.Description" /></td>
</tr>
<tr>
<td class="label-cell"><label>Base Layer</label></td>
<td><input type="checkbox" name="IsBaseLayer" ng-model="dataItem.IsBaseLayer" /></td>
</tr>
<tr>
<td class="label-cell"><label>Type</label></td>
<td><select kendo-drop-down-list style="width: 200px;" k-data-source="mlc.layerTypes"
k-data-text-field="'DisplayName'" k-data-value-field="'Id'"
ng-model="dataItem.Type"></select>
</td>
</tr>
<tr>
<td class="label-cell"><label>URLs</label></td>
<td>
<div kendo-list-view id="listView" k-data-source="dataItem.Params.url"
k-editable="true" k-navigatable="true" style="height:300px; width:100%;">
<div k-template style="display:flex; flex-direction: row; align-items:center; margin:5px;">
<div style="display:inline-block;width:400px;word-wrap: break-word">{{ dataItem }}</div>
<a style="align-self: flex-end;" class="k-button k-button-icontext k-edit-button kendo-command-notext"><span class="k-icon k-edit"></span></a>
<a style="align-self: flex-end;" class="k-button k-button-icontext k-delete-button kendo-command-notext"><span class="k-icon k-delete"></span></a>
</div>
<div k-edit-template style="display:flex; flex-direction: row; align-items:center; margin:5px;">
<input type="text" ng-model="dataItem" class="k-textbox" name="URL" required="required" validationMessage="required" />
<a style="align-self: flex-end;" class="k-button k-button-icontext k-update-button kendo-command-notext"><span class="k-icon k-update"></span></a>
<a style="align-self: flex-end;" class="k-button k-button-icontext k-cancel-button kendo-command-notext"><span class="k-icon k-cancel"></span></a>
</div>
</div>
</td>
</tr>
</table>
</script>

The array of URLs displays just fine, but when I click the edit button I get an error in the console:

Uncaught TypeError: Cannot read property 'uid' of undefinedkendo.all.js:57092
kendo.ui.DataBoundWidget.extend.editkendo.all.js:57175
(anonymous function)jquery-2.1.1.min.js:3
n.event.dispatchjquery-2.1.1.min.js:3
n.event.add.r.handle

I have no idea how to troubleshoot this.
Petur Subev
Telerik team
 answered on 13 Feb 2015
1 answer
559 views
I have the following code which adds a diagram and a couple of shapes.  Is there anyway to apply a class to the underlying svg?

var element = $("#paper").kendoDiagram({
                    shapeDefaults: {
                        width: 85,
                        height: 110,
                        editable: false,
                        content: {
                            align: 'center'
                        },
                        hover: {
                            fill: "lightgrey"
                        },
                        stroke: {
                            width: 1,
                            color: 'black'
                        }
                    },
                    connectionDefaults: {
                        type: "polyline",
                        endCap: "ArrowEnd"
                    }
                });
                var diagram = element.data("kendoDiagram");
                var operand = diagram.addShape({
                    width: 85,
                    height: 110,
                    x: 20,
                    y: 187,
                    editable: { connect: false },
                    fill: {
                        color: '#00CC00'
                    },
                    content: {
                        text: 'Quarter',
                    }
                });

                var operator = diagram.addShape({
                    width: 85,
                    height: 110,
                    x: 203,
                    y: 20,
                    fill: {
                        color: '#00CC00'
                    },
                    content: {
                        text: 'Target %'
                    }
                });
T. Tsonev
Telerik team
 answered on 13 Feb 2015
1 answer
567 views
I'm getting this null thing in the chart and I wonder if I can hide or remove it. Please note that I can't change the data..
Danail Vasilev
Telerik team
 answered on 13 Feb 2015
3 answers
169 views
Hi

I want to extend the default edit template with only one field.

I have read through the documentation and it seems I have to replace the whole edit window - and recreating the default template to then add my custom field.

http://dojo.telerik.com/IqIYI

Can you please provide me (I did not find it) with the html code for the default edit popup so that I can add my field?

Many thanks
Markus
Top achievements
Rank 1
 answered on 13 Feb 2015
1 answer
534 views

So I'm working with the Kendo Grid in MVC and my customer needs a grid in which he can filter columns on certain sets of choices. And he needs to see which filters are currently active.
I'm using a grid with the row filtermode set and I'm setting the template on the filter (through the FilterableSettings.CellSettings.Template.HandlerName property of the GridBoundColumn). I'm showing a dropdown with the choices the customer can check. Basically what I want to accomplish is this but it doesn't work with the row filtermode set. I found this example and I'm using it with the template to show a dropdown in every column, except it has side-effects I don't want. The effects are:

  1. It shows the dropdown with empty rows in between the actual options, see the dropdown screenshot. Why does this happen?
  2. It filters the wrong way (on objects, see the filter screenshot) on closing of the dropdown. I want to override the way of filtering, but where can I hook in to override this? I don't know which event is thrown when closing the dropdown nor do I know on which element the element is hooked.

Below shows the code I'm having so far for the filtertemplate:

function filterMenu(container) {
        debugger;
 
        // Determine which field this is and get the appropriate choices
        var currentColumnIndex = $(".k-filter-row").children().length - 1;
        var headers = $($(".k-grid-header").children()[0]).children();
        var currentHeader = headers[currentColumnIndex];
        var customField = currentHeader.getAttribute("data-customfield"); // Use for support in < IE 11, otherwise could have use .dataset.customfield
        var choices = specialFilterFields[customField];
 
        var dropDown = container.element.kendoDropDownList({
            dataTextField: "Choice",
            dataValueField: "Choice",
            template: '<li unselectable="off" class="k-item nowrap check-item">' +
                    '<input type="checkbox" name="#= Choice #" value="#= Choice #" class="check-input" />' +
                    '<span>#= Choice #</span>' +
                    '</li>',
            placeholder: "Filter...",
            select: function(e) {
                e.preventDefault();
            },
            dataSource: choices,
            valuePrimitive: false
        }).data("kendoDropDownList");
 
        dropDown.list.find(".check-input,.check-item").bind("click", function (e) {
            var $item = $(this);
            var $input;
            if ($item.hasClass("check-item")) {
                $input = $item.find("input");
                $input.prop("checked", !$input.is(":checked"));
            } else {
                $input = $item;
            }
 
            // Update the style of the checkboxes
            $.uniform.update($input);
 
            // Update the text of the dropdown
            updateDropDown(dropDown);
 
            e.stopImmediatePropagation();
        });
 
        updateDropDown(dropDown);
    }
 
    function updateDropDown(dropdown) {
        var items = [];
 
        dropdown.list.find(".check-input").each(function () {
            var $input = $(this);
            if ($input.val() != "" && $input.is(':checked'))
                items.push($input.val());
        });
        dropdown.text(items.toString());
    }

Daniel
Telerik team
 answered on 13 Feb 2015
1 answer
63 views
Hi I am trying to recreate the example of the filter row.

http://dojo.telerik.com/iYUPU/2

After creating data myself the filter does not work anymore.

On my local test environment I am using
transport: {
           read: {
                     url: "partials/tasks.json",
                     dataType: "json"
               }
          },

...which also does not seem to kick off the filter when I type anything or press enter.

What is wrong with this example? http://dojo.telerik.com/iYUPU/2

Thanks
Vladimir Iliev
Telerik team
 answered on 13 Feb 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?