Understanding JQGrid column width behaviors

前端 未结 6 1608
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 12:39

I have a tree grid with many columns, all with specified width. And boy, it looks terrible since headers are out of sync with columns below, even if I have short data in them.

6条回答
  •  迷失自我
    2021-02-04 13:20

    Set the Each Column width in percentage by CSS

    Add the css classes as below

    table.ui-jqgrid-htable thead{display:table-header-group}
    #JQGridClientMaster td, #ui-jqgrid-htable th{display:table-cell}
    

    Now Set the width to each column of and

    #JQGridClientMaster td:nth-child(1),th#JQGridClientMaster_rn{width:2% !important;}
    

提交回复
热议问题