Aug 16

OnRender Event for List widget

For list widget, you have the onRender event. This event gets triggered when the list widget has rendered. 

Use case:

A user wants to select a particular item on page load by passing the index/model of the list item.

For the above use case add the onRender callback event and call the selectItem method (exposed on list widget) by passing index/model of the item.


Event Execution Order:

onBeforedataRender → onRender → onSelect

Note: If you enable selectfirstrecord and write widget.selectItem(5) in onRender event, then the first item will be selected (selectfirstrecord will take preference because onRender event triggers before the select event). If you want to select a particular item then you have to turn off selectfirstrecord.

We use cookies to provide you with a better experience. By using our website you agree to the use of cookies as described in our Privacy Policy.