Skip to content
InfinityKnow

InfinityKnow

Infinity Knowledge (IK) : Technology, Articles, Topics, Facts or many More.

  • Home
  • Education
    • yttags
    • Make Money
    • Jobs
    • Programming
      • Technology
      • Web Design
      • WEB HOSTING
      • Interview
  • Entertainment
    • pakainfo
    • Sports
    • Tips and Tricks
      • Law
      • Photography
      • Travel
  • Health
    • Insurance
    • Lifestyle
      • Clothing
      • Fashion
      • Food
  • News
    • Insurance
      • Auto Car Insurance
      • Business Insurance
    • Donate
    • California
  • News
    • Political
  • Home Improvement
  • Trading
    • Marketing
    • Top Tranding
    • Business
    • Real Estate
  • Full Form
  • Contact Us
  • Buy Facebook Likes and Followers free website List
    Buy Facebook Likes and Followers free website List Make Money
  • Good night gujarati suvichar suvichar
  • Angular get post Method in php MySQLi Technology
  • AngularJS Tutorial RESTful JSON Parsing
    AngularJS Tutorial RESTful JSON Parsing Technology
  • keral mein kaun si bhasha boli jaati hai Facts
  • C# HashSet Tutorial with Examples Technology
  • Matrix: Evaluating Matrices using Crammer’s Rule Tips and Tricks
  • Angularjs Get data from array of objects in controller
    Angularjs Get data from array of objects in controller Technology
VueJS Grid - Advanced Data Grid Component

VueJS Grid – Advanced Data Grid Component

Posted on July 1, 2018 By admin No Comments on VueJS Grid – Advanced Data Grid Component

VueJS Grid – Advanced Data Grid Component

In this Post We Will Explain About is VueJS Grid – Advanced Data Grid Component With Example and Demo.

Welcome on infinityknow.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Simple Vuejs Grid Component – Vuejs Script

In this post we will show you Best way to implement Data Grid Control – Vuejs Data Grid Component, hear for How to Vue.JS – Advanced Data Grid Component with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

READ :  Top AngularJS Interview Questions and answers

First of simple create a new This is an simple example of new creating a very reusable grid data component data and using simple it with more external dataGrid Component Example.

index.html

[php]

Vue.JS simple table Datagrid

[/php]

Script.js

[php]
Vue.filter(“groupBy”, function(value, key) {
var data_groups = {
data: value
};

if (key) {
data_groups = {};
for (var data_in = 0; data_in < value.length; data_in++) { var row = value[data_in]; var datacell = row[key]; if (!data_groups.hasOwnProperty(datacell)) { data_groups[datacell] = []; } data_groups[datacell].push(row); } } return data_groups; }); Vue.filter("date", function(value, format) { var date = moment(value); if (!date.isValid()) { return value; } return date.format(format); }); Vue.component("dropdown", { template: "#dropdown-template", props: { for: { type: String, required: true }, origin: { type: String, default: "top right" }, preserveState: { type: Boolean, default: false } }, computed: { originClass: function() { switch (this.origin) { case "top left": return "dropdown-top-left"; case "bottom left": return "dropdown-bottom-left"; case "bottom right": return "dropdown-bottom-right"; } } }, data: function() { return { show: false }; }, ready: function() { var _this = this; var element = document.getElementById(_this.for); var hide = function(event) { event.stopPropagation(); if (!(_this.preserveState && _this.$el.contains(event.target))) { _this.show = false; document.body.removeEventListener("click", hide); } }; var show = function(event) { event.preventDefault(); event.stopPropagation(); var dropdowns = [].slice.call(document.querySelectorAll(".dropdown")); dropdowns.forEach(function(dropdown) { dropdown.__vue__.show = false; }); if (!_this.show) { _this.show = true; document.body.addEventListener("click", hide); } }; element.addEventListener("click", show); } }); Vue.component("datagridOptions", { template: "#datagrid-options-template", props: { gridId: { type: String, required: true }, columns: { type: Array, required: true }, data_all_sel: { type: Boolean }, allowEdit: { type: Boolean }, gpcolm: { type: Object, required: true }, dataFilter: { type: String, required: true }, showAdvancedOptions: { type: Boolean } }, methods: { getDatactrlnm(columnKey, datasufix) { return this.gridId + "-" + columnKey + "-" + datasufix; } } }); Vue.component("datagrid", { template: "#datagrid-template", components: ["datagridOptions"], props: { id: { type: String, required: true }, columns: { type: Array, required: true }, data: { type: Array }, datacellTemplate: { type: String, required: false, default: "firstgrid" }, data_all_sel: { type: Boolean, required: false, default: false }, allowEdit: { type: Boolean, required: false, default: false }, showDefaultOptions: { type: Boolean, required: false, default: true }, showAdvancedOptions: { type: Boolean, required: false, default: false } }, computed: { data_colspan: function() { return this.data_all_sel ? this.columns.length + 1 : this.columns.length; }, showOptions: function() { return this.showDefaultOptions || this.showAdvancedOptions; }, showFooter: function() { return this.dataFilter || this.gpcolm || this.myrow.length > 0;
}

},
data: function() {

return {
sortingKey: null,
sortingDirection: 1,
gpcolm: null,
dataFilter: null,
myrow: [],
selectAll: false
};

},
methods: {

getCellTemplate: function(column) {
return this.allowEdit ? “editableGridCell” : (column.template || this.datacellTemplate);
},

getCellWidth: function(column) {
if (!column.width) {
return;
}

return column.width + (isNaN(column.width) ? “” : “%”);
},

getControlId: function(mygpname, index, datasufix) {
return mygpname + “-” + index + (datasufix ? “-” + datasufix : “”);
},

sortBy: function(column) {
if (column.key === this.sortingKey) {
this.sortingDirection *= -1;
return;
}

this.sortingKey = column.key;
this.sortingDirection = 1;
},

groupBy: function(column) {
this.gpcolm = column;
},

resetFilter() {
this.dataFilter = null;
},

total_grouping() {
this.gpcolm = null;
},

resetSelection() {
this.myrow = [];
this.selectAll = false;
},

formatData: function(column, value) {
if (column.hasOwnProperty(“filter”)) {
var filter = Vue.filter(column.filter.name);
var args = [].concat(value, column.filter.args);
return filter.apply(this, args);
}
return value;
}
},
watch: {

“selectAll”: function(value) {
this.myrow = value ? [].concat(this.data) : [];
}

}
});

Vue.partial(“firstgrid”, “{{ formatData(column, row[column.key]) }}“);
Vue.partial(“editableGridCell”, ““);
Vue.partial(“linkedGridCell”, ““);

var vue = new Vue({
el: “#index”,
data: {
employeer: {
columns: [{
key: “user_fname”,
name: “Given Name”,
template: “linkedGridCell”
}, {
key: “user_lastname”,
name: “user_lastname”
}, {
key: “useremail”,
name: “useremail”,
width: 33
}, {
key: “date_birth”,
name: “Date of Birth”,
filter: {
name: “date”,
args: [“DD MMMM YYYY”]
}
}],
data: [{
“ID”: 0,
“user_fname”: “John”,
“user_lastname”: “drhitesh”,
“date_birth”: “1986-10-03T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Co-Founder and CEO”,
“office”: “drhitesh Steel Pty Ltd”
}, {
“ID”: 1,
“user_fname”: “Jane”,
“user_lastname”: “drhitesh”,
“date_birth”: “1988-05-28T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Co-Founder and CEO”,
“office”: “drhitesh Steel Pty Ltd”
}, {
“ID”: 2,
“user_fname”: “Richard”,
“user_lastname”: “Swanston”,
“date_birth”: “1972-08-15T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Purchasing manager”,
“office”: “Cortana Mining Co”
}, {
“ID”: 3,
“user_fname”: “Robert”,
“user_lastname”: “Brown”,
“date_birth”: “1968-01-18T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Sales Manager”,
“office”: “Powerhouse Marketing”
}, {
“ID”: 4,
“user_fname”: “Phillip”,
“user_lastname”: “Zucco”,
“date_birth”: “2018-06-28T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Applications Developer”,
“office”: “Workplace Pty Ltd”
}, {
“ID”: 5,
“user_fname”: “arti”,
“user_lastname”: “arti”,
“date_birth”: “2018-07-27T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “arti manager”,
“office”: “mayur Industries Ltd.”
}, {
“ID”: 6,
“user_fname”: “dwplak”,
“user_lastname”: “O’Reilly”,
“date_birth”: “2018-08-15T00:00:00”,
“useremail”: “[email protected]”,
“posttitle”: “Workplace Health and Safety manager”,
“office”: “lorial office”
}]
}
}
});
[/php]

Example

I hope you have Got TreeGrid: Vuejs table, grid, tree view or Gantt chart And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.

Related posts:

  1. Vuejs UI Grid Component Sorting Filtering Paging Grouping
  2. VueJS Datagrid – Sorting Filtering Paging Grouping Example
  3. Vuejs Form Input Bindings – vuejs form component-Vuejs-Form
  4. vuejs Dynamic component HTML Templates data
Technology, VueJs Tags:ag grid vue, vue component example, vue js grid component, vue js grid layout, vue.js editable grid, vuejs components, vuejs grid layout, vuejs table component

Post navigation

Previous Post: AngularJS Datepicker Directives Example with Source Code
Next Post: Search Comma Separated values using Laravel Query FIND_IN_SET

Related Posts

  • Laravel Pass Data To All Views Example Technology
  • Vuejs DataTable Searching Sorting Pagination PHP with MySQL
    Vuejs DataTable Searching Sorting Pagination PHP with MySQL Technology
  • Angular Dynamic Get JSON Data in PHP MySQLi Technology
  • Vue SEO Tutorial Guide for Beginners
    Vue SEO Tutorial Guide for Beginners Technology
  • PHP MySQLi Star Rating System using Ajax Jquery
    PHP MySQLi Star Rating System using Ajax Jquery Technology
  • JavaScript Read XML File local Example
    JavaScript Read XML File local Example Technology

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Account web hosting (1)
  • AngularJs (277)
  • Articles (143)
  • Asp.Net (49)
  • Astrology (2)
  • Attorney (7)
  • Auto Car Insurance (4)
  • Biography (2)
  • Business (9)
  • Business Insurance (3)
  • California (4)
  • Choose the web hosting (1)
  • Clothing (6)
  • cloud (8)
  • Cloud data storage (2)
  • Credit (1)
  • Dedicated hosting server web (1)
  • Dedicated server web hosting (1)
  • Dedicated web hosting (1)
  • Degree (11)
  • Design (9)
  • Differences shared hosting (1)
  • Donate (2)
  • Education (37)
  • Energy web hosting (1)
  • Entertainment (6)
  • Facts (12)
  • Fashion (3)
  • Finance (3)
  • Food (5)
  • full form (90)
  • Google Adsense (22)
  • Health (20)
  • Home Improvement (5)
  • Insurance (6)
  • Interview (2)
  • Jobs (6)
  • jquery (2)
  • jQuery (2)
  • Laravel (164)
  • Lawyer (4)
  • Lifestyle (6)
  • Loans (6)
  • Make Money (31)
  • Managed dedicated server (1)
  • Managed hosting solution (1)
  • Managed servers (1)
  • Marketing (8)
  • Mortgage (2)
  • Movies (21)
  • MySQL (180)
  • News (5)
  • Photography (1)
  • PHP (250)
  • Programming (18)
  • Quotes (75)
  • Real Estate (2)
  • SEO (9)
  • Shared web hosting (1)
  • Shayari (67)
  • Sports (5)
  • Status (34)
  • Stories (45)
  • suvichar (8)
  • Tech (3)
  • Technology (675)
  • Tips and Tricks (42)
  • Top Tranding (35)
  • Trading (28)
  • Travel (12)
  • Uncategorized (8)
  • VueJs (179)
  • Web Design (2)
  • WEB HOSTING (1)
  • Web hosting company (1)
  • Web hosting really (1)
  • Web hosting windows (1)
  • Which website hosting (1)
  • Wishes (13)
  • wordpress (15)

Categories

AngularJs (277) Articles (143) Asp.Net (49) Attorney (7) Business (9) Clothing (6) cloud (8) Degree (11) Design (9) Education (37) Entertainment (6) Facts (12) Food (5) full form (90) Google Adsense (22) Health (20) Home Improvement (5) Insurance (6) Jobs (6) Laravel (164) Lifestyle (6) Loans (6) Make Money (31) Marketing (8) Movies (21) MySQL (180) News (5) PHP (250) Programming (18) Quotes (75) SEO (9) Shayari (67) Sports (5) Status (34) Stories (45) suvichar (8) Technology (675) Tips and Tricks (42) Top Tranding (35) Trading (28) Travel (12) Uncategorized (8) VueJs (179) Wishes (13) wordpress (15)
  • Meditouch EMR
    Meditouch EMR – A Run Down of the Software Tips and Tricks
  • Angularjs push object into array first index – angularjs unshift Examples
    Angularjs push object into array first index – angularjs unshift Examples Technology
  • Angular Insert Update Delete Using PHP MySQLi Technology
  • Alcohol and Blood Pressure
    Know About Alcohol and Blood Pressure Articles
  • Friendship shayari
    Friendship shayari Shayari
  • vue autocomplete text input example – vuejs-autocomplete textbox
    vue autocomplete text input example – vuejs-autocomplete textbox Technology
  • VueJS Features and Benefits – Vuejs advantages and disadvantages
    VueJS Features and Benefits – Vuejs advantages and disadvantages Technology
  • Famous quotes Quotes

Copyright © 2022 InfinityKnow.

Powered by PressBook News WordPress theme