Easygrid icon indicating copy to clipboard operation
Easygrid copied to clipboard

error when putting sortable = false on id

Open danyyacoub opened this issue 10 years ago • 1 comments

Hi,

Adding sortable false to this column causes an error

                    {
                        label ""
                        formatName 'toolsFormat'
                        sortable false
                        enableFilter false
                    }
assert column.sortable
       |      |
       |      false
       org.grails.plugin.easygrid.ColumnConfig(, null, id, null, toolsFormat, EasygridConfig$_run_closure1_closure2_closure7@36b3151, false, null, null, true). Stacktrace follows:
Message: Executing action [recipeGridRows] of controller [com.acme.citysweet.entities.RecipeController]  caused exception: assert column.sortable
       |      |
       |      false
       org.grails.plugin.easygrid.ColumnConfig(, null, id, null, toolsFormat, EasygridConfig$_run_closure1_closure2_closure7@36b3151, false, null, null, true)
    Line | Method
->>  189 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread
Caused by PowerAssertionError: assert column.sortable
       |      |
       |      false
       org.grails.plugin.easygrid.ColumnConfig(, null, id, null, toolsFormat, EasygridConfig$_run_closure1_closure2_closure7@36b3151, false, null, null, true)
->>   37 | valueOfSortColumn in org.grails.plugin.easygrid.GridUtils
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    301 | doCall    in org.grails.plugin.easygrid.datasource.GormDatasourceService$_createWhereQuery_closure9_closure15
|    298 | doCall .  in org.grails.plugin.easygrid.datasource.GormDatasourceService$_createWhereQuery_closure9
|    242 | createWhereQuery in org.grails.plugin.easygrid.datasource.GormDatasourceService
|    196 | list . .  in     ''
|     31 | methodMissing in org.grails.plugin.easygrid.EasygridDispatchService
|     66 | gridData  in org.grails.plugin.easygrid.EasygridService
|     75 | doCall    in org.grails.plugin.easygrid.EasygridInitService$_registerControllerMethods_closure4
|    217 | guard . . in org.grails.plugin.easygrid.EasygridService
|    110 | doCall    in org.grails.plugin.easygrid.EasygridInitService$_registerControllerMethods_closure9_closure17
|    189 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
|     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
|     49 | doFilter  in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
|     82 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
|   1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
|    617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^    745 | run       in java.lang.Thread

danyyacoub avatar Dec 07 '14 16:12 danyyacoub

The issue is that the "sortable" property of the actual column is not in sync with the "sortable" property of the grid renderer.

This should be fixed in the next version. Until then , you will have to add:

                   {
                        label ""
                        formatName 'toolsFormat'
                        sortable false
                        enableFilter false
                        jqgrid{
                             sortable false
                        }
                    }

tudor-malene avatar Feb 07 '15 11:02 tudor-malene