1

First of all, I just want to say good job with the slickgrid plugin. I love it!

So my problem is that I have implemented a grid with the header menu plugin. However some of my columns that use the header menu also have sorting enabled. So whenever you click to get the header menu, it also does a column sort as well. Is there a way to click on the header menu arrow without sorting the columns?

Thanks

Edit: I just realized in the example: http://mleibman.github.io/SlickGrid/examples/example-plugin-headerbuttons.html

They had an option to sort columns as a menu item. So I am starting to think it is not possible and the work around is to add sorting in as menu items...

2 Answers 2

1

If you want the both, add:

if($(e.target).hasClass("slick-header-menubutton")){
    return;
}

in the head of setupColumnSort() in slick.grid.js.

It works perfectly for me!

Adrien

Sign up to request clarification or add additional context in comments.

Comments

0

Remove "sortable:true" from the column definition and the sorting will stop.
i.e. columnDefs = {{id:"id",name:"ID",field:"idField",cssClass:"Slick-cell",sortable:true}};

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.