Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Table events

Events.After table initialized

Scroll Prev Next More


The AfterTableInit event is executed upon loading each page before any processing takes place, right after the AfterAppInit event. Use this event to override any table-specific ASPRunner.NET variables.


Check the description area in the Event editor to find the list of available table variables.


Note: It's not recommended to display anything on the web page from this event. This may break your application.

Applies to pages

All table specific pages like List, Print, Edit, Add, Export etc.


To set the default records per page value to 10:


GlobalVars.tables_data["tableName"][".pageSize"] = 10;


Additional info


In this event you can use table variable to access the name of the current table.


This is how we can use this variable to add an Additional Where Tab programmatically:


Add the 'ANTON orders' tab:


WhereTabs.addTab(table, "CustomerID='ANTON'", "ANTON orders", "anton");


Recommended  sample events

Dynamic SQL query

Add WHERE clause to the current SQL query

Replace WHERE clause of the current SQL query

Add a field name to the end of SELECT clause of the current SQL query

Remove a field name from the SELECT clause of the current SQL query

Replace field name in the SELECT clause of the current SQL query with new one

See also:

Choose pages screen

Datasource tables

After application initialized

About Database API