changing JQgrid column name dynamically

前端 未结 6 1813
时光说笑
时光说笑 2020-12-10 06:26

I just need to rename JQgrid column dynamically as per user selection from a list of options. How can I do that?

6条回答
  •  悲&欢浪女
    2020-12-10 07:04

    The latest version of jqGrid (4.1+ - possibly earlier) no longer appears to support the column index based setLabel approach described by Galichev, a columnName based approach is provided instead:

    jQuery("#grid1").jqGrid('setLabel', 'columnName', 'NewLabel');
    

    See the jqGrid Methods wiki for more information.

    I've left the previous answer unedited as this approach may be valid in versions prior to 4.1.

提交回复
热议问题