Telerik Forums
Kendo UI for Vue Forum
2 answers
310 views

I need to open the Master-detail template not only on the "+" or "arrow" icon but on another button on the screen.

In other words, How can we invoke the "expandChange" method from other element instead of <Grid @expandchange="expandChange" > to expand/collapse the detail template?

 

Template: I want to expand the detail template with the click of the Edit button.

<Grid
      :data-items="sampleData"
      :columns="columns"
      :detail="cellTemplate"
      :expand-field="'expanded'"
      @expandchange="expandChange"
    >
      <template v-slot:actionColumn>
        <td>
          <div class="d-flex align-items-center tbl-actions">
            <button
              type="button"
              title="Edit"
              @click="expandChange"
              class="btn btn-icon d-flex align-items-center"
            >
              <span class="icon icon-edit"></span>
            </button>
            <button
              type="button"
              title="Add to Cart"
              class="btn btn-icon d-flex align-items-center"
            >
              <span class="icon icon-cart"></span>
            </button>
          </div>
        </td>
      </template>

      <template v-slot:expandTemplate> Detail template goes here.... <template>

 

Method: 

 expandChange: function (event: any) {
      event.dataItem[event.target.$props.expandField] = event.value;

      if (event.value) {
        event.event.target.parentNode.parentNode.classList.add("expanded-row");
      } else {
        event.event.target.parentNode.parentNode.classList.remove(
          "expanded-row"
        );
      }
    },

 

Jagdish
Top achievements
Rank 1
Iron
 updated answer on 24 Jun 2021
1 answer
99 views

Hi,

I am using Vue JS 2.6 stable version. Will the UI Controls work without issue or Is there any other configuration i need to do use with 2.x version?

Plamen
Telerik team
 answered on 24 May 2021
1 answer
353 views

Hello Folks, 

After updating vue to lattest version, I have this error after each 'npm run build' command:

 

Maybe, you have some project example with vue 3 and these libs (@progress/kendo-base-components-vue-wrapper,  @progress/kendo-base-components-vue-wrapper etc).

Here is my packege.json:

{
  "name": "",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build --mode development",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "vue": "3.0.11",
    "vue-template-compiler": "^2.6.12",
    "@progress/kendo-base-components-vue-wrapper": "^2021.1.330",
    "@progress/kendo-charts-vue-wrapper": "^2021.1.330",
    "@progress/kendo-inputs-vue-wrapper": "^2021.1.330",
    "@progress/kendo-licensing": "^1.1.4",
    "@progress/kendo-popups-vue-wrapper": "^2021.1.330",
    "@progress/kendo-theme-bootstrap": "^4.35.1",
    "@progress/kendo-ui": "^2021.1.119",
    "@progress/kendo-vue-dateinputs": "^2.1.5",
    "@progress/kendo-vue-dropdowns": "^2.1.5",
    "@progress/kendo-vue-inputs": "^2.1.5",
    "@progress/kendo-vue-intl": "^2.1.5",
    "axios": "^0.21.1",
    "bootstrap": "^4.6.0",
    "cldr-core": "36.0.0",
    "cldr-dates-full": "36.0.0",
    "cldr-numbers-full": "36.0.0",
    "core-js": "^3.6.5"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.11",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-vue": "^6.2.2",
    "vue": "3.0.0"
  },
  "eslintConfig": {
    "root": true,
    "env": {
      "node": true
    },
    "extends": [
      "plugin:vue/essential",
      "eslint:recommended"
    ],
    "parserOptions": {
      "parser": "babel-eslint"
    },
    "rules": {}
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not dead"
  ]
}

 

 

Thanks.

Andrew
Top achievements
Rank 1
Iron
 answered on 05 May 2021
8 answers
262 views

My Gantt config is like this:

 

<ganttdatasource ref="ganttdatasource1"
                        :transport-read="ganttRead"
                        :transport-update="ganttUpdate"
                        :transport-create="ganttCreate"
                        :transport-destroy="ganttDestroy"
                        :transport-parameter-map="parameterMap"                          
                        :transport-submit="ganttSubmit"
                        schema-model-id="id"
                        :schema-model-fields="fields"
>
</ganttdatasource>
 
<ganttdependencydatasource ref="ganttdependencydatasource1"
                        :transport-read="dependRead"
                        :transport-update="dependUpdate"
                        :transport-create="dependCreate"
                        :transport-destroy="dependDestroy"
                        :transport-parameter-map="parameterMap"
                        schema-model-id="id"
                        :schema-model-fields="dependencyFields"
>
</ganttdependencydatasource>
 
    <gantt
        ref="kendogantt"
        id="gantt"
        :height="500"
        :editable-create="true"        
        data-source-ref="ganttdatasource1"           
        dependencies-data-source-ref="ganttdependencydatasource1"
        :assignments="assignments"         
        :resources="resources"
    >
    </gantt>

 

Then methods:

methods: {
    dependRead: async function(options) {
        console.log("dependRead!", options)
        try {
 
            const links = await this.$axios.$get(................)
 
            options.success(links)
 
        } catch (ex) {
            options.error(ex)
        }          
    },

 

All works fine except that I get spurious calls to dependRead, in the console I see two or three logs for 'dependRead' every time the gantt loads.

If I remove the async/await code then I see only one call to dependRead as expected - so my question is, should I be using blocking or non-blocking handlers for this? async handlers are the correct approach by my thinking...

 

[Interestingly ganttRead uses exactly the same async mechanism but that is only ever called once]

Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 29 Apr 2021
3 answers
333 views

I have some additional info that I want to capture when creating a new task for the Gantt eg. task owner, status etc. so obviously I will need a custom screen to capture the extra info, I was thinking along these lines:

- Have a custom 'add task button' & hide the built-in one

- The button will open my custom screen which mimics the builtin one, but with some additional fields

- On save, the screen directly updates that backend and then refresh the gantt

 

Is this the best way to do this and/or is there any flaw with this approach?

If ok, then how would I refresh the gannt? would I have to rebind it or is it better/possible to add the new task to the datasource and then sync?

Petar
Telerik team
 answered on 23 Apr 2021
13 answers
302 views

Hello,

I would like to call a component that contains only the custom edit template (to create a new task or edit) for my scheduler.

I followed this solution but the edit window just displays "[Object object]"

The code of scheduler

<kendo-scheduler id="scheduler"
      :data-source="localDataSource"
      :event-template="eventTemplate"
      :editable="{template:editTemplate}"
    >

 

The code of the method editTemplate()

methods: {
    editTemplate: function(){
      return {
         template: Vue.component(CustomEditTemplate.name, CustomEditTemplate),
      
    }
},

 

The code of the component that contains the custom template

<template>
    <div class="k-edit-form-container">
        <p> Titre <input type="text" /> </p>
        <p>
            <span >Start <input data-role="datetimepicker" name="start" /> </span>
            <span >End <input data-role="datetimepicker" name="end" /> </span>
        </p>
    </div>
</template>
 
<script>
export default {
    name:"CustomEditTemplate",
}
</script>

 

I think the problem comes from the method editTemplate but I don't undestand why.

Anyone can help me ?

 

Thanks.

 

 

 

Petar
Telerik team
 answered on 12 Apr 2021
3 answers
66 views

I have config like this:

 

<ganttdatasource ref="ganttdatasource1"
                        :transport-read="ganttRead"
                        :transport-update="ganttUpdate"
                        :transport-create="ganttCreate"
                        :transport-destroy="ganttDestroy"
                        :transport-parameter-map="parameterMap"                          
                        :transport-submit="ganttSubmit"
                        schema-model-id="id"
                        :schema-model-fields="fields">
</ganttdatasource>

 

From what I can tell from the docs if transport-submit is defined then the create/update/destroy functions should not be fired and all should be batched up into a single call to transport-submit, but this does not happen: transport-submit is never called and transport-update etc. are all called as normal.

Is this a bug or do I misunderstand the operation?

Petar
Telerik team
 answered on 29 Mar 2021
3 answers
89 views

If possible, please point me to a working example of this using remote data source. My config as below:

    <ganttdatasource ref="ganttdatasource1"
                            :transport-read="ganttRead"
                            :transport-update="ganttUpdate"
                            :transport-create="ganttCreate"
                            :transport-destroy="ganttDestroy"
                            :transport-parameter-map="parameterMap"                           
                            :transport-batch="true" 
                            schema-model-id="id"
                            :schema-model-fields="fields">
    </ganttdatasource>

        <gantt
            ref="kendogantt"
            id="gantt"
            :height="500"
            :editable-create="true"         
            data-source-ref="ganttdatasource1"            
            :assignments="assignments"          
            :resources="resources"
        >
        </gantt>

 

 

I'm using the gantt with remote data with custom functions (I use axios, not Telerik gantt data source built-in features). When the gantt first loads it gets it's tasks from  'transport-read', task resource assignments from 'assignments' prop, and resources from 'resources' prop. All works just fine.

 

Now when a task's assignment is updated, it triggers my custom function 'ganttUpdate', it passes in a data object with all the task data + a .resources. property that has all the assignments for the task and I can update my backend ok.

What I don't understand is what I need to return from 'ganttUpdate' - I mean there are now two places where the task resource assignments are kept (1) on the task itself in the .resources property, and (2) on the gantt in the 'assignments' prop (which has all the assignments for all tasks). It is very confusing.

Petar
Telerik team
 answered on 23 Mar 2021
7 answers
89 views

I have a simple gantt linked to local datasource (there is no backend api), when adding a task I want to handle the onAdd event and mutate the local datasource.

It seems to work ok except that the id of the new task in onAdd is set to 0 (console.log(e.task) in on Add) - am I supposed to set this id value manually?

Petar
Telerik team
 answered on 17 Mar 2021
2 answers
79 views

I have the code below as per the docs, all is fine except the parameter map function never gets called (for any operation, read or create etc.)

 

    <ganttdatasource ref="ganttdatasource1"
        :transport-read="gRead    
        :transport-parameter-map="parameterMap"
        ......
    </ganttdatasource>

    <gantt
        data-source-ref="ganttdatasource1"
......
    ></gantt>

    methods: {
        parameterMap: function(options, operation) {
            console.log("parameterMap!", options)       //Never see this
            .....
        }

Al
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 10 Mar 2021
Narrow your results
Selected tags
Tags
Grid
DropDownList
Grid wrapper
Editor
DatePicker
DropDownTree wrapper
Scheduler
Spreadsheet wrapper
Input
Editor wrapper
MultiSelect
DateInput
NumericTextBox
Scheduler wrapper
Styling / Themes
Calendar
DataSource wrappers (package)
Chart
Chart wrappers (package)
DateTimePicker
Gantt wrapper
Localization
Pager
Checkbox
Upload
DropDownList wrapper
Window
Error
Form
Tooltip
TreeView
ComboBox
Dialog
MultiSelect wrapper
NumericTextBox wrapper
Popup
Slider
Toolbar wrapper
Upload wrapper
Validator wrapper
ColorPicker
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
FloatingLabel
TextArea
Drawer
Stepper
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
RadioButton
RadioGroup
Hint
Loader
ProgressBar
DateRangePicker
Switch
Wizard
Skeleton
ScrollView
ColorGradient
ColorPalette
FlatColorPicker
Button
ButtonGroup
TileLayout
ListBox
ExpansionPanel
BottomNavigation
AppBar
Signature
ChunkProgressBar
VS Code Extension
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?