Loading Row Template

Canvas supports events for customization while loading the Row Template:

  • Before Loading Template

    If you want to make any changes in the template before loading it, use the BEFORE_TEMPLATE_LOAD event.

    Sample code is as follows:

    CWEH.registerHandler('WGT_DEPOSIT_SUMMARY', CWEC.BEFORE_TEMPLATE_LOAD, function(elem,callbckfn)
    {
    	var data =
    	{
    		subDataArray : elem.record
    	}
    	
    	callbckfn.apply(elem.scope,[data]);
    
    	LOGGER.info('The BEFORE_TEMPLATE_LOAD event is captured.', [elem]);
    });
    
    // Here, 'WGT_DEPOSIT_SUMMARY' is the widget ID.
  • After Loading Template

    If you want to make any changes in the template after loading it, use the AFTER_TEMPLATE_LOAD event.

    Sample code is as follows:

    CWEH.registerHandler('WGT_DEPOSIT_SUMMARY', CWEC.AFTER_TEMPLATE_LOAD, function(elem)
    {
    	$(elem.elem).find('.actionselection-col').addClass('hidden');
    	$(elem.elem).find('.rowsexpand-col').addClass('hidden');
    });
    
    // Here, 'WGT_DEPOSIT_SUMMARY' is the widget ID.