Results 1 to 6 of 6

Thread: Cannot prevent sort on checkcolumn if header checkbox is hidden

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-23387 in 6.5.4.
  1. #1
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    72

    Default Cannot prevent sort on checkcolumn if header checkbox is hidden

    Setting "sortable:false" basically does nothing in the Ext.grid.column.Check component (Modern Toolkit) if "headerCheckBox" is set to false.

    The code in updateHeaderCheckbox() function sets sortable to be the opposite of headerCheckBox regardless of the value of the sortable config.

    Call me crazy but I would like to have a checkcolumn that hides the header checkbox AND is not sortable.

    fiddle:

    https://fiddle.sencha.com/#view/editor&fiddle/1ncn

  2. #2

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3

    Default

    I see an issue but not sure what you were reporting is what it is. Your example is sortable by one column but that is because it was not set to sortable false. I don't think that has anything to do with the headerCheckbox. Have I misunderstood you?

    The issue I was reporting was the fact that a glyph is attached to the header even though you aren't sorting.

    Kevin Jackson
    Sencha Support Team

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2014
    Posts
    72

    Default

    Ok I see what you are saying. The columns don't actually sort, but the up and down sort arrows are displayed even though the columns are configured with sortable:false. I guess that is what I'm trying to prevent.

  5. #5
    Ext JS Premium Member antonye's Avatar
    Join Date
    May 2010
    Location
    London, UK
    Posts
    41

    Default

    This is still an issue in 6.5.2 - the columns ARE still sortable and still display the arrow when "sortable: false" AND "headerCheckbox: false".

  6. #6
    Ext JS Premium Member antonye's Avatar
    Join Date
    May 2010
    Location
    London, UK
    Posts
    41

    Default

    Note: as a workaround, you can set the sorter: to null which removes the column's ability to sort.
    I am using the grid to display static data, so I don't want to show the checkbox in the column, the sorting context menu nor do I want the user to be able to sort the column.
    My column definition in the grid looks like this:

    Code:
    ...
    {
        xtype: 'checkcolumn',
        text: 'Offer',
        dataIndex: 'offer',
        headerCheckbox: false,
        menuDisabled: true,
        resizable: false,
        sortable: false,
        sorter: null
    }
    ...

Similar Threads

  1. Replies: 3
    Last Post: 27 Jun 2013, 11:48 AM
  2. CheckColumn.js Header checkbox exntension.
    By pjamrisk in forum Ext 3.x: Help & Discussion
    Replies: 40
    Last Post: 21 Sep 2010, 10:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •