jqGrid showCol/hideCol not working after sorting

前端 未结 1 1634
说谎
说谎 2021-01-26 08:15

The below given code illustrates what I have done fro hide/show. It does work on load but wouldn\'t work after sorting

grid.jqGrid({
    url: \"process         


        
相关标签:
1条回答
  • 2021-01-26 08:25

    Sorry but what you expect with posting of such code? It looks like you get it from the garbage. It's not polite to the readers!

    Nevertheless the code have clear at least two problems:

    1. creating of dialog inside of loadComplete which will be executed multiple times (for example after sorting, paging and so on. It seems that you should move the code and place it after the grid is created. In the same way one need to bind $('#chooseField').click(...) and $('form#myform').submit(...) once and not every time on executing loadComplete.
    2. you use id attributes in the <form> which are the same as the name properties in the colModel. It could follow problems with id duplicates if you would use form editing for example. It seems to me that you can rewrite the code of form and binding to checkboxes without usage and id attributes at all.
    0 讨论(0)
提交回复
热议问题