Skip to content

How to disable re-ordering for just one column #5784

Answered by minhhungit
ghost asked this question in Help
Discussion options

You must be logged in to vote

To disable sort feature on a column, you can use attribute [Sortable(false)], for example:

In your columns.cs

[Sortable(false)]
public String Title { get; set; }

Another way grid.ts:

protected getColumns() {
    var columns = super.getColumns();

    let customerCol = Q.tryFirst(columns, x => x.field == "Customer");
    if (customerCol) {
        customerCol.sortable = false;
    }

    return columns;
}

To fixed/frozen a column in grid, reference to this demo http://jlynch7.github.io/SlickGrid/examples/example-frozen-columns

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant