How to turn off sorting in grid combo for a specific column

Before we explore this topic let me just say that I have two pieces of good news and I have one piece of bad news for you. Which do you want to read first?

Let’s start with the bad one first. The bad news is that currently you cannot define the “column” configuration setting, as the plugin will override this.

The first good news is that we’ve filed an enhancement request for this requirement to add support within the plugin attributes in a future release. The second piece of good news, as you might probably expect, is that until that release becomes effective there is a workaround.

You can use the following javascript snippet within a dynamic action which fires on the grid combo expand event:

var grid = (this.data && this.data.grid) ? this.data.grid : undefined;
if (grid) {
var column = grid.query('#P4004_GRID_COMBO-col-ZIP_CODE')[0];
if (column) {
column.sortable = false;
}
}

 

The following screenshots should guide you with this process:

 

FOEX Grid Combo disable sort

 

FOEX Grid Combo disable sort javascript

 

Note: In the example above we locate the column using the following syntax [ITEM_NAME]-col-[COLUMN_ALIAS] (i.e. replace P4004_GRID_COMBO-col-ZIP_CODE with your item name and the name of the column alias you want to disable).

 

Looking to build large-scale web applications fast? Sign up and start developing with FOEX!

Categories FOEX Grid
Add your comment

Your email address will not be published. Required fields are marked *