In a form, is it possible to use other components like dataview, datatable, etc?
You can embed any view into the form. Please check
Thank you. I thought only form elements were supported. So, they data can be supplied to the form, so that all children (including dataview/datatable) will take data?
Yep. But if you want to useform.setValues()
, you need to define thesetValue
andgetValue
methods for the datatable, i.e. to create a custom component:
webix.protoUI({
name:"formtable",
$allowsClear:true, // reflect to form.clearAll()
setValue:function(value){ . . . },
getValue:function(){ . . . }
}, webix.ui.datatable);
A very common use-case is setting/getting the selection:
http://webix.com/snippet/01e7064d
In case of data loading the methods should be configured as follows:
http://webix.com/snippet/e9eb4b0c
Besides, you still can load the data using the id of the particular component.