How do set active tab of tabview ?

Hi all !

i using tabview contains 2 tab { id: ‘tabListItem’,…} and {id: ‘tabInfoItem’,…}. But i don’t know how do set active tab (show tab) by any function. i’m using $$(‘tabInfoItem’).show() but it not working…


{
	view: "tabview",
	id: 'tabViewInfo',
	autoheight: true,
	autowidth: true,
	cells: [{
		header: "Danh sách",
		id: 'tabListItem',
		//gravity: 1,
		body: {
			autoheight: true,
			autowidth: true,
			cols: [{
				autoheight: true,
				autowidth: true,
				rows: [{
					view: "datatable",
					id: 'gridInfo',
					height: 300,
					actionDelete: false,
					//autoConfig: true,
					columns: [{
						id: "tendoituong",
						header: "Đối tượng",
						adjust: true,
						fillspace: true
					}
					],
					select: true
				}]
			}]
		}
	},
	{
		header: "Thông tin",
		id: 'tabInfoItem',
		//gravity: 1,
		body: {
			autoheight: true,
			autowidth: true,
			cols: [{
				rows: [{
					view: "text",
					width: '100%',
					id: 'txtTenDoiTuong',
					value: '',
					label: "Tên đối tượng",
					labelWidth: 120,
					labelAlign: 'right'
				}]
			}]
		}
	}]
}

Please copy and format with another tools, i don’t know insert fomat code in post.

Can anyone support me ?

Hello,

You can get to a tabbar object of a tabview and set the needed value dynamically.

$$("tabViewInfo").getTabbar().setValue("tabInfoItem");

But you need to assign ids (tabInfoItem, tabListItem) to a body part of each cell.

Check the snippet below:
http://webix.com/snippet/4986dacf

You can format the code in posts as

~js
//js code
~

Thank @Helga