Page 1 of 1

[VUE] It possible change the column width on click?

Posted: Tue Jun 08, 2021 2:23 pm
by Webethics

It is possible to change the column width on click?


Re: [VUE] It possible change the column width on click?

Posted: Tue Jun 08, 2021 2:24 pm
by mats

Sure, columns is just a simple store with normal records:

grid.columns.first.width = 200

Re: [VUE] It possible change the column width on click?

Posted: Tue Jun 08, 2021 3:02 pm
by Webethics

Where it can be applied?


Re: [VUE] It possible change the column width on click?

Posted: Tue Jun 08, 2021 4:03 pm
by saki

Well, you add it where you want the column width to change. For demonstration, you can use advanced grid Vue demo and replace content of the addRecord handler in components/Grid.vue with:

addRecord() {
    const grid = this.$refs.grid.instance;
    grid.columns.first.width = 400;
}

Now, when you click Add Record the first column changes width.


Re: [VUE] It possible change the column width on click?

Posted: Fri Jun 11, 2021 9:57 am
by Webethics

It has worked for me. Thank you!