Telerik Forums
Kendo UI for Vue Forum
1 answer
180 views

Hello,

i am currently evaluating kendo ui and i am in a struggle while implementing the following:

Since i have many resources and events i want to use server filtering.

The example from the link below works great for event filtering.
https://docs.telerik.com/kendo-ui/controls/scheduling/scheduler/how-to/filtering/server-filtering


My problem is i would need the resources also to load dynamically from a datasource(with start/end set parameters)
But since the resources seems to be loaded before the scheduler view seems to be ready i do not have the start/end variables.

Changing the resources after the scheduler is loaded and perform a scheduler.refresh does not work.
It is showing the changed resources only after an action on the scheduler (change view, click on today)

Do you have any hints for this?

Thank you and best regards, Alex

Veselin Tsvetanov
Telerik team
 answered on 30 Nov 2018
1 answer
2.6K+ views
Hi, i want to add auto row number in grid, i have tested itemtemplate but it doesnot work, also in group mode i want to work row numbers!

<template>
  <div class="wrapper wrapper-content animated fadeInRight">
    <div class="k-rtl">
      <kendo-datasource
        ref="datasource1"
        :transport-read-url="'/trips'"
        :transport-read-data-type="'json'"
        :transport-parameter-map="parameterMap"
        :schema-model-id="'ID'"
        :schema-model-fields="schemaModelFields"
        :batch="false"
        :page-size="25"
      ></kendo-datasource>
      <kendo-grid
        ref="grid"
        :page="page"
        @databinding="onDataBinding"
        :height="600"
        :data-source-ref="'datasource1'"
        :editable="'inline'"

     :groupable="groupable"

      >
        <kendo-grid-column title="#" :template="itemTemplate"></kendo-grid-column>
        <kendo-grid-column field="TruckID" title="T"></kendo-grid-column>
        <kendo-grid-column field="ShovelID" title="S"></kendo-grid-column>
        <kendo-grid-column field="ShovelMeta" title="M"></kendo-grid-column>
        <kendo-grid-column field="UnloadingID" title="TT"></kendo-grid-column>
        <kendo-grid-column field="ServiceStatus" title="V"></kendo-grid-column>
        <kendo-grid-column field="DT_ExitShovel" title="E"></kendo-grid-column>
        <kendo-grid-column field="DT_ExitUnloading" title="ET"></kendo-grid-column>
      </kendo-grid>
      <script id="itemTemplate" type="text/x-kendo-template">
        <div>{{ ++record}}</div>
      </script>
    </div>
  </div>
</template>
 
<script>
const swal = require("sweetalert2");
 
export default {
  data() {
    return {
      record: 0,
      gpage: 1,

groupable: {
messages: {
empty: "تگ ها را انتخاب کنید"
}
},

      }
 },
   
 
  mounted() {},
 
  methods: {
    itemTemplate: function(e) {
      var template = kendo.template(kendo.jQuery("#itemTemplate").html());
      return template(e);
    },
    parameterMap: function(options, operation) {
      if (operation !== "read" && options.models) {
        return { models: kendo.stringify(options.models) };
      }
    },
    onDataBinding: function(ev) {
      this.record = (this.gpage - 1) * this.$refs.datasource1.pageSize;
      console.log(this.record);
    },
    onDataBound: function(ev) {
      //console.log("Grid is now bound!");
    },
    page: function(e) {
      this.gpage = e.page;
    }
  }
};
</script>
<style src="sweetalert2/dist/sweetalert2.min.css"></style>
Viktor Tachev
Telerik team
 answered on 29 Nov 2018
1 answer
217 views

I'm trying to access KendoWidget wrapper to print the chart in pdf. The code seems right but returning undefined when i try to call this.$refs.graph.kendoWidget()

the chart is rendered, i'm trying to trigger an event to catch the reference to the widget.

 

in the console i am printing the reference to the element, the function and the result of the function

 

after that i expand the vue ref element and i see the function have the right target function but shows this message

 

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.remoteFunction (<anonymous>:2:14)

 

i'm not sure if this is a scope problem or an error in the import.

Please help me with this

 

Joana
Telerik team
 answered on 15 Nov 2018
5 answers
445 views

Hello
We are developing a module whereby what is selected on one grid filters a second grid. As part of this we need to enable multi-select on the master grid. 

I have two separate scripts for getting the data item of the selected grids, but both seem a little slow, ~1 sec to ~3 secs.

The scripts we are testing are:

onChange: function(ev) {
      var that = this;
      var selected = $.map(ev.sender.select(), function(item) {
        var tr = $(item).closest('tr');
        var grid = that.$refs.itemsGrid.kendoWidget();
        var data = grid.dataItem(tr);
        return data.itemNumber;
      });
      this.$root.$emit('item-grid-selected',selected);
    },
change: function(e) {
    var selectedRows = e.sender.select();
    var selectedDataItems = [];
    for (var i = 0; i < selectedRows.length; i++) {
      var dataItem = e.sender.dataItem(selectedRows[i]);
      selectedDataItems.push(dataItem.name);
    }
    console.log(selectedDataItems);// contains all selected data items
    this.$root.$emit('item-grid-selected',selectedDataItems);
  },

 

with the grid code of:

<kendo-grid ref="itemsGrid"
                  :data-source="items"
                  v-on:databound="autoFitColumns"
                  :sortable-mode="'single'"
                  :sortable-allow-unsort="true"
                  :groupable="true"
                  :pageable="false"
                  :page-size="20"
                  :pageable-page-size="10"
                  :pageable-always-visible="false"
                  :filterable-mode="'row'"
                  :selectable="'multiple'"
                  :toolbar="[]"
                  :editable="false"
                  :server-paging="false"
                  :column-menu="true"
                  :scrollable-horizontal="true"
                  v-on:change="change"
                  v-on:save="grid_save"
    </kendo-grid>

Without any event raised on the change event of the grid, the selection following a click of any rows in the grid is seemingly instant. Just for info, there are only three rows in this table, so it is not because there is a lot to go through.

 

Can you make any suggestions for speeding this up?

Regards
John

Ianko
Telerik team
 answered on 15 Nov 2018
1 answer
239 views

We have a multilanguage application and we need to change the Kendo UI for Vue language dynamically.

 

We are found a Angular example https://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/AngularJS/angular-dynamic-language-change, but this way is not available with Vue.

 

For our custom message with use vue-i18n plugin, but we want to use the kendo.messages.xx-XX.js files, but only (the last) is active.

 

Thks.

 

 

Nencho
Telerik team
 answered on 13 Nov 2018
1 answer
100 views

when i change the data-source the console prints some error.

This is the template code

<kendo-datasource
  :ref="'datasource'"
  :data="chart">
</kendo-datasource>
<kendo-stockchart
  :data-source-ref="'datasource'"
  :date-field="'date'"
  :category-axis-labels-rotation="'auto'"
  :navigator-series="navigatorSeries"
  :navigator-category-axis-labels-rotation="'auto'"
  :theme="'sass'">
    <kendo-chart-series-item
      :type="'line'"
      :field="'value'">
    </kendo-chart-series-item>
 </kendo-stockchart>

 

And this is the JS

export default {
  name: "RatingHistory",
  components: {
    StockChart,
    DataSource
  },
  data(){
    return{
      services:Object,
      historicData:[],
      fields: {
        date: { type: 'date' }
      },
      navigatorSeries: {
        type: 'area',
        field: 'value'
      }
    }
  },
  computed:{
    chart(){
      return this.historicData
    }
  },
  created(){
    this.services = new Services()
    this.fetchData()
  },
  methods:{
    async fetchData(){
      let result
      try {
        result = await this.services.getRatingHistory()
      } catch(e) {
        console.log("Error getting data--->", e)
      }
      if(result.successful && result.statusCode === 200){
        this.historicData = result.data
      }
    }
  }
};

 

The chart render as expected, but i always see this error.

 

any light on how to prevent it ?

 

Joana
Telerik team
 answered on 13 Nov 2018
1 answer
601 views

How do you set another culture to be the default?

Trying to set Norwegian as the default  the currency format is correct in Grid

Nencho
Telerik team
 answered on 02 Nov 2018
2 answers
114 views

Hello All ,

We are trying to use a graph with negative stacks. I have looked through all the available Kendo charts and graphs but could not find a similar one. Can you please point me in the right direction if you came across a similar situation. I have attached the graph for reference.

Thank you

 

IT
Top achievements
Rank 1
 answered on 01 Nov 2018
16 answers
643 views

So how do we add a Detail Template? The docs are seriously lacking for Vue wrappers!!

I have this - which i assume would reference a $ref od "detail" but instead outputs a string

<kendo-grid ref="grid"
:data-source-ref="'dataSource'"
:menu="true"
:sortable='true'
:pagable="true"
:groupable="false"
:detail-template="'detail'">

Dimitar
Telerik team
 answered on 01 Nov 2018
2 answers
121 views

 Hello,

I'm building a general modal component using the Window. Is it possible to pass a Vue component as template for a kendo Window?

Thanks!

 

Cristiano
Top achievements
Rank 1
 answered on 01 Nov 2018
Narrow your results
Selected tags
Tags
Grid
General Discussions
DropDownList
DatePicker
Editor
Grid wrapper
Scheduler
DropDownTree wrapper
Spreadsheet wrapper
Input
MultiSelect
Calendar
NumericTextBox
DateInput
DateTimePicker
Editor wrapper
Styling / Themes
DataSource wrappers (package)
Scheduler wrapper
Chart wrappers (package)
Gantt wrapper
Localization
Chart
Checkbox
ComboBox
Window
Pager
Error
Upload
DropDownList wrapper
Popup
Form
Tooltip
TreeView
Dialog
MultiSelect wrapper
NumericTextBox wrapper
Slider
Toolbar wrapper
Upload wrapper
Validator wrapper
ColorPicker
Button
Accessibility
AutoComplete
AutoComplete wrapper
Button wrapper
ComboBox wrapper
ContextMenu wrapper
Licensing
ListBox wrapper
ListView wrapper
Map wrapper
MaskedTextBox
Menu wrapper
MultiColumnComboBox wrapper
Splitter wrapper
TabStrip wrapper
TimePicker
TreeView wrapper
TabStrip
Card
RadioButton
FloatingLabel
TextArea
Drawer
Stepper
DateRangePicker
Gauge
Splitter
PanelBar
Notification
RangeSlider
Menu
TreeList
Toolbar
ListView
FontIcon
SVGIcon
Animation
Barcode wrapper
ButtonGroup wrapper
Chat wrapper
ColorPicker wrapper
DateInput wrappers (package)
Diagram wrapper
Dialog wrapper
Gauges wrappers (package)
MaskedTextBox wrapper
MediaPlayer wrapper
Notification wrapper
Pager wrapper
PanelBar wrapper
PivotGrid wrapper
QRCode wrapper
RangeSlider wrapper
ScrollView wrapper
Security
Slider wrapper
Switch wrapper
Tooltip wrapper
TreeList wrapper
TreeMap wrapper
Window wrapper
Avatar
StockChart
Sparkline
RadioGroup
Hint
Loader
ProgressBar
Switch
Wizard
Skeleton
ScrollView
ColorGradient
ColorPalette
FlatColorPicker
ButtonGroup
TileLayout
ListBox
ExpansionPanel
BottomNavigation
AppBar
Signature
ChunkProgressBar
VS Code Extension
SpeechToTextButton
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?