Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

[Added] Subform: onSubformTitleClick()

Information about updates, news, Code Library
admin
Site Admin
Posts: 2720
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5

[Added] Subform: onSubformTitleClick()

Unread post by admin »

If the function exists (declared in the form's custom code), it will be run when the user clicks on a subform's column which will sort that column.

By returning false, sorting will not be be performed for all subforms on that form:

Code: Select all

function onSubformTitleClick() {
    return false;
}
To disable sorting only for subform with Id mySubformId:

Code: Select all

function onSubformTitleClick(id, e) {
    return id !== 'mySubformId';
}

To disable sorting for a column with id customer on a subform with Id mySubformId

Code: Select all

function onSubformTitleClick(id, e) {  
    return ! (id == 'mySubformId' && e.currentTarget.getAttribute('data-nu-field') == 'customer')
}
Post Reply