Turn off Options on Select Menu

1). Is there an easy way to disable all of the data manipulation statements on the client (the Select Menu).

2). If the user selects the SORT option, they see all of the columns in the table. Is there a way to restrict the list of columns for sorting. I do not want the end user delving into our table structure!

thanks

bruce

  1. Yes. Set each corresponding form property value to “none”.

  2. Set list view form’s onSortCmd property to “none”. Then create a globals.gToggle field and allow toggling of each column’s sort order by attaching an onAction method under properties to each column heading label. Use a method like this:

if (!globals.gToggle)
{
globals.gToggle = "1";
forms.list_view_form_name.controller.sort('column_name desc');
}
else
{
globals.gToggle = "";
forms.list_view_form_name.controller.sort('column_name asc');
}

Substitute appropriate form name and column name in the above code. If you want to reuse the same sort method for different columns you can use:

var item = application.getMethodTriggerElementName();

to identify which label is being clicked and adjust the logic within your sort method accordingly.