callEvent

calls an inner event

boolean callEvent(string name,array params);
namestringthe event name, case-insensitive
paramsarraythe array of the event parameters
booleanfalse, if some of the event handlers return false. Otherwise, true

Example

{
  view:"form",
  elements:[
    { view:"text", name:"fname" },
    {
      view:"button", value:"Add a field", click:function(){
 
        var form = this.getFormView();
        var fields = Object.keys(form.elements).length;
 
        form.addView({
          view:"text",
          name:"field_" + webix.uid()
        },fields);
 
        form.callEvent("onAfterFieldAdded", [ ++fields ]);
      } 
    }
  ]
}

Related samples

Details

Normally, events are called automatically and you don't need to use this method.

See also
Back to top
If you have not checked yet, be sure to visit site of our main product Webix widget library and page of download datatable product.