小编Moh*_*sir的帖子

Jqgrid柱宽根据其内容

我的Jqgrid.All列中有很多列,显示两侧的额外空间.我希望该列没有额外的间距.列宽应根据其内容具有宽度.我尝试过autowidth但它不起作用.

实际行为如下所示:

-----------------------------------------------
|     Name     |     Mobile     |    Email    |
----------------------------------------------- 
Run Code Online (Sandbox Code Playgroud)

而我需要的是:

----------------------
|Name|Mobile No|Email|
----------------------
Run Code Online (Sandbox Code Playgroud)

这是我的代码

 $("#list").jqGrid({
     datatype: "local",
     data: mydata,
     colNames: ["Name", "Mobile", "Email", "Amount", "Tax", "Total", "Closed", "Shipped via", "Notes"],
     colModel: [
                { name: "id", width: 65, align: "center", sorttype: "int", hidden: true },
                { name: "invdate", width: 80, align: "center", sorttype: "date",
                    formatter: "date", formatoptions: { newformat: "d-M-Y" }, datefmt: "d-M-Y"
                },
                { name: "name", width: 70 },
                { name: "amount", width: 75, formatter: …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jqgrid

3
推荐指数
1
解决办法
8433
查看次数

标签 统计

javascript ×1

jqgrid ×1

jquery ×1