how to set combo View Pages to pager pagination?

Hi Everyone:

Is there a simple function or parameter that sets richselect combo as the size of the pager coding? So when a user selects 20 view pages, the pager size is then set to display 20…

		var toolbar = {
		  view:"toolbar",
		  elements:[
			{ 
				view:"richselect", width:170, labelWidth:90,
				label: 'View Pages', labelAlign:"left",
				value:1, options:[
					{ id:1, value:"10"   }, 
					{ id:2, value:"15"   }, 
					{ id:3, value:"20"   }, 
					{ id:4, value:"50" }
				]
			},
		    {view:"search", align:"right", placeholder:"Search by keyword", id:"searchfilter", inputWidth: 250}
		  ]
		}

http://docs.webix.com/samples/15_datatable/19_paging/07_localization.html

You can use onChange event of richselect, from it you can use something like

$$("pager").define("size", this.getValue())
$$("pager").refresh();

Getting error with define… also tried using .set, attr, and .setAttribute … same result

$$(“pager”).define(“size”, this.getValue())

click:function works but not onchange:function as below
var toolbar = {
view:“toolbar”,
elements:[
{
view:“richselect”, width:170, id:“toolbarViewPages”, labelWidth:90,
label: ‘View Pages’, labelAlign:“left”,
value:1, options:[
{ id:1, value:“10” },
{ id:2, value:“15” },
{ id:3, value:“20” },
{ id:4, value:“50” }
],
onchange:function(){
//alert(this.data.text);
//console.log(this);
pagerSize = this.data.text;
//pagerGroup = Math.ceil(resultData[‘data’].length / pagerSize);
//grid.refreshGrid();
alert('pS = ’ + pagerSize );
}
},
{view:“button”, value:“Status”,width:70},
{view:“search”, align:“right”, placeholder:“Search by keyword”, id:“searchfilter”, inputWidth: 250}
]
}

I was able to get on: { onchange:function() … } to work. Thank you guys.