Telerik Forums
Kendo UI for jQuery Forum
4 answers
967 views

Hi, 

I'm looking to implement an "action bar" when a user mouse hover a row. Just like in gmail or outlook365 when a user mouse is hover a message, icons appear to delete, mark as read, ...

 

All I found as of now, is to reserve a column and with jquery/css show/hide the icons. I don't want to reserve a specific column for that. I want it to be on either at the beginning (left) or at the end (right) of a row and on top of the row. I attached an image to demonstrate what I want to do.

 

An ideas ?

 

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 18 Jun 2020
7 answers
803 views

How to show the tooltip shown in the screenshot when hovering (mouseenter) over (x) axes labels?

Thanks in advance

Nikolay
Telerik team
 answered on 18 Jun 2020
6 answers
664 views

Hi All,

I have created a bar chart , now I want to filter that chart with some selector outside the chart.

I would like to know how to filter the chart data on selecting drop down list( containing Country data).

Please see my code:

How do I filter my chart with dropdown selector.

Kindly Please help me.

Thanks,

Amit

001.<!doCTYpe html>
002.<html>
003.<head>
004.<link href="kendo.metro.min.css" rel="stylesheet">
005.<link href="kendo.common.min.css" rel="stylesheet">
006. 
007. 
008.<script src="jquery.min.js"></script>
009.<script src="kendo.all.min.js"></script>
010. 
011.</head>
012.<body>
013.<div id="example">
014.    <div class="demo-section k-content wide">
015.        <div id="chart"></div>

<label class="category-label" for="category">Search by Country:</label>
                    <input id="country" style="width: 150px"/>

016.    </div>
017.    <script>
018.    var monthdata = [
019.    {month:"Jan",wordpress:"5",codeigniter:"5",highcharts:"8",country:"USA"},
020.    {month:"Feb",wordpress:"5",codeigniter:"2",highcharts:"8",country:"India"},
021.    {month:"Mar",wordpress:"6",codeigniter:"3",highcharts:"9",country:"USA"},
022.    {month:"Apr",wordpress:"2",codeigniter:"6",highcharts:"6",country:"India"},
023.    {month:"May",wordpress:"5",codeigniter:"7",highcharts:"7",country:"USA"},
024.    {month:"Jun",wordpress:"7",codeigniter:"1",highcharts:"10",country:"SA"},
025.    {month:"Jul",wordpress:"2",codeigniter:"2",highcharts:"9",country:"SA"},
026.    {month:"Aug",wordpress:"1",codeigniter:"6",highcharts:"7",country:"India"},
027.    {month:"Sep",wordpress:"6",codeigniter:"6",highcharts:"6",country:"USA"},
028.    {month:"Oct",wordpress:"7",codeigniter:"4",highcharts:"9",country:"India"},
029.    {month:"Nov",wordpress:"3",codeigniter:"6",highcharts:"8",country:"USA"},
030.    {month:"Dec",wordpress:"4",codeigniter:"3",highcharts:"4",country:"SA"},
031.    {month:"Jan",wordpress:"5",codeigniter:"6",highcharts:"7",country:"USA"}];
032.     
033.    var sharedDataSource = new kendo.data.DataSource({
034.    data: monthdata,
035.    group:{
036.        field: "month",
037.        aggregates:[
038.        {field: "wordpress" , aggregate:"sum"},
039.        {field: "codeigniter" , aggregate:"sum"},
040.        {field: "highcharts" , aggregate:"sum"}
041.         
042.        ]
043.         
044.         
045.    },
046.    schema:
047.    {
048.        model:{
049.        fields:{
050.             
051.            wordpress: { type: "number"},
052.            codeigniter: { type: "number"},
053.            highcharts: { type: "number"},
054.             
055.             
056.        }
057.        }
058.    }
059.     
060.     
061.});
062.sharedDataSource.read();
063. 
064.var seriesA = [],
065.    seriesB = [],
066.    seriesC = [],
067.    categories = [],
068.    items = sharedDataSource.view(),
069.    length = items.length,
070.    item;
071. 
072.//create the chart series 
073.for (var i = 0; i < length; i++) {
074.    item = items[i];
075.     
076.    //    This is what I want to do..
077.    //seriesA[0].push(item.aggregates.len.sum);
078.    //seriesA[1].push(item.aggregates.wid.sum);
079.    //     or
080.    //seriesA.push([{item.aggregates.len.sum},{item.aggregates.wid.sum}]);
081.     
082.     
083.    seriesA.push(item.aggregates.wordpress.sum);
084.    seriesB.push(item.aggregates.codeigniter.sum);
085.    seriesC.push(item.aggregates.highcharts.sum);
086.    categories.push(item.value);
087.}
088.$(document).ready(function() {
089.         
090.            $("#chart").kendoChart({
091.                dataSource: sharedDataSource,
092.                title: {
093.                    text: "Chart Rating"
094.                },
095.                legend: {
096.                    visible: false
097.                },
098.                seriesDefaults: {
099.                    type: "bar",
100.                    stack:true
101.                },
102.                series: [
103.                {
104.                    name: "wordpress",
105.                   data: seriesA,
106.                color: "#3CB371"},
107.                {
108.                    name: "codeigniter",
109.                    data: seriesB,
110.                color: "#FFA500"
111.                },
112.                {
113.                    name: "highcharts",
114.                    data: seriesC,
115.                color: "#FF0000"
116.                }],
117.                valueAxis: {
118.                     
119.                    line: {
120.                        visible: true
121.                    },
122.                    minorGridLines: {
123.                        visible: true
124.                    }
125.                },
126.                categoryAxis: {
127.                    categories: categories,
128.                    majorGridLines: {
129.                        visible: false
130.                    }
131.                },
132.                tooltip: {
133.                    visible: true,
134.                    template: "#= series.name #: #= value #"
135.                }
136.            });

 $("#country").kendoDropDownList({
                        
                        dataTextField: "country",
                        dataValueField: "country",
    optionLabel: "All",
                        dataSource: monthdata
                      
                    });

137.});
138.        
139. 
140.    </script>
141.</div>
142. 
143. 
144.</body>
145.</html>
Silviya Stoyanova
Telerik team
 answered on 18 Jun 2020
1 answer
682 views

In the column width page of the grid documentation https://docs.telerik.com/kendo-ui/controls/data-management/grid/columns/widths, it says:

 

When scrolling is enabled:

- When all columns have pixel widths and their sum is less than the width of the Grid, the column widths are ignored and the browser expands all columns.

 

Is there a way to disable that for certain columns?  Some of my columns - especially the command column - look really stupid when the auto-resizing adds a bunch of whitespace to them.

 

Plamen | Lead Technical Support
Telerik team
 answered on 18 Jun 2020
2 answers
7.1K+ views
Good morning I have to realize multiselect with checkbox.
The final result will be very similar to this:
http://embed.plnkr.co/OVPTCV/
This example, however, is very old and I noticed that with the 2018 version of kendo it does not work perfectly.
It is possible to have the same result using the version of kendo 2018 which seems to me to use different approaches. (eg tagtemplate)

Joabe
Top achievements
Rank 1
 answered on 17 Jun 2020
2 answers
435 views

When using tagMode single, text appears how many items are selected. (2 item(s) selected).

How can I translate this text. I though that there would be some line in kendo.messages.de/fr ... But it is not.

Joabe
Top achievements
Rank 1
 answered on 17 Jun 2020
2 answers
466 views

I'm using the scheduler for only all-day items, and would like to sort items based off a given field (in this case a C# long value).

How would I go about doing this?
This is my current code:

@{
    ViewBag.Title = $"Profile Calendar";
}
<style>
    /* increase the height of the cells in day, work week and week views */
    .k-scheduler-table td,
    .k-scheduler-table th {
        height: 1em;
    }
 
    /* The following styles will work only with Kendo UI versions before 2020 R1 */
    /* increase the height of the month view cells */
    .k-scheduler-monthview .k-scheduler-table td {
        height: 20em;
    }
 
    .k-event-template {
        font-size: 0.75em;
        width: 125px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
 
<h2>@ViewBag.Title</h2>
 
<div id="scheduler"></div>
 
<script>
    $(function() {
        $("#scheduler").kendoScheduler({
            change: function(e) {
                var start = e.start;
                var end = e.end;
 
                console.log(kendo.format("Selection between {0:g} and {1:g}", start, end));
            },
            edit: function(e) {
                e.preventDefault(true);
                window.location.href = "@Url.Action("View", "Profile")?id=" + e.event.ProfileId;
            },
            views: [
                { type: "month", selected: true},
                { type: "day"},
            ],
            resources: [{
                dataSource: {
                    transport: {
                        read: {
                            url: "@Url.Action("ListAll", "Lab")"
                        }
                    },
                    schema: {
                        model: {
                            id: "Id",
                            fields: {
                                Id: {
                                    "type": "number"
                                },
                                ProfileId: {
                                    "type": "number"
                                },
                                Name: {
                                    "type": "string"
                                },
                                DisplayColor: {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                title: "Lab",
                field: "LabId",
                dataTextField: "Name",
                dataValueField: "Id",
                dataColorField: "DisplayColor"
            }],
            dataSource: {
                transport: {
                    read: {
                        url: "@Url.Action("List", "Calendar")",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    },
                    parameterMap: function (options, operation) {
                        if (operation === "read") {
                            var scheduler = $("#scheduler").data("kendoScheduler");
                            var result = {
                                start: scheduler.view().startDate(),
                                end: scheduler.view().endDate()
                            }
                            return kendo.stringify(result);
                        }
                        return kendo.stringify(options);
                    }
                },
                serverFiltering: true,
                schema: {
                    model: {
                        id: "taskID",
                        fields: {
                            taskID: { from: "TaskID", type: "number" },
                            title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                            start: { type: "date", from: "Start" },
                            end: { type: "date", from: "End" },
                            startTimezone: { from: "StartTimezone" },
                            endTimezone: { from: "EndTimezone" },
                            description: { from: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            ownerId: { from: "OwnerID", defaultValue: 1 },
                            isAllDay: { type: "boolean", from: "IsAllDay" },
                            LabId: { from: "LabId", type: "number" },
                            ProfileId: { from: "ProfileId", type: "number" }
                        }
                    }
                }
            }
        });
    });
</script>

 

The field I want to sort by is LabId, which is a long.

Additionally, if there was a way to do this in MVC instead, greatly appreciated. With the inclusions of resources, I had trouble doing it in MVC.

Jason
Top achievements
Rank 1
Veteran
 answered on 17 Jun 2020
5 answers
254 views

Hi, I've been trying to figure out a way to make the markers on my scatter chart solid. It'd be nice if there was a prop for this.

I am able to set the color with a function, but that only sets the stroke color. I can set the background in the marker props, but that doesn't take a function so some of my points don't have a matching background to stroke. 

Kara
Top achievements
Rank 1
Veteran
 answered on 17 Jun 2020
3 answers
182 views

Hi All, 

   I have a js variable JSON_DATA that contains the return result from a .py api.  It has a schema 'xyz' and 5 columns (a,b,c,d,e).  I've tried to setup the the schema and datasource several different ways and I can't seem to get it to bind the data.  Can someone shed some light on this for me?  See below:

This is where I'm at now, I removed schema to see if I could get something back but I'm stuck: 

 

 \$(document).ready(function() {
                     \$("#grid").kendoGrid({
                        dataSource: {
                            data: $JSON_DATA },
                        height: 550,
                        scrollable: true,
                        sortable: true,
                        filterable: true,
                        pageable: {
                            input: true,
                            numeric: false
                        },
                        columns: [
                          { field: 'productType', title: 'CSS-WX Product Type', width: '230px'}, 
                            { field: 'serviceType', title: 'Web Service Type', width: '100px'},
                            { field: 'average', title: 'Average', width: '130px' },
                            { field: 'target', title: 'Target', width: '130px' },
                            { field: 'iterations', title: 'Iterations', width: '130px' }
                        ]
                    });
                });

Martin
Telerik team
 answered on 17 Jun 2020
2 answers
264 views

I have a TreeView implementation that often contains hierarchies that have large numbers of nodes in very flat structures.  While I have drag and drop working, the usability just isn't very good.  So, I'm implementing a cut/paste mechanism where the cut simply remembers the unique id of the source node and on paste of the target node, I get the source node using its id and attempt to .append(sourceNode, targetNode).

However, this doesn't seem to work.

Is this the best way to approach this or is there a different way I should approach this?

 

  $("#mnuHierarchyRightClick").kendoContextMenu({
            target: "#tvHierarchy",
            filter: ".k-in",
            select: function (e) 
            { 
                switch (e.item.id) 
                {
                    case "mnuHierarchyRightClickCut":

                         var tv = $("#tvHierarchy").data("kendoTreeView");
                         var dataItem =  tv.dataItem(e.target);
                    
                        self.setClipBoard(dataItem.ID,'Clipboard: ' + dataItem.Text);

                        break;

                    case "mnuHierarchyRightClickPaste":

                         
                        self.paste(e.target);

                        break;
                    default:
                        break;
                };
            }
        });

// called from click on context menu of the TreeView

MyController.prototype.paste = function (targetNode)
{
    var self = this;

    try
    {
       
        var tv = $("#tvHierarchy").data("kendoTreeView");

        if (targetNode == null) { return false; }

        var targetDataItem = tv.dataItem(targetNode);
        var pastedDataItem = tv.dataSource.get(self.ClipBoardPrimaryKeyID);

        self.setClipBoard(0,'');

        var pastedNode = tv.findByUid(pastedDataItem.uid);

        pastedDataItem.set('parentID', targetDataItem.id);
 
        tv.append(pastedNode,targetNode);

 
    }
    catch(e)
    {
        alert(e);
    }
 
}

Petar
Telerik team
 answered on 17 Jun 2020
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
Drag and Drop
Application
Map
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?