jqgrid选择输入宽度

use*_*586 2 jqgrid

如何控制选择输入类型的宽度?这是我的代码:

{name:'code',index:'code', width:60, sorttype:"int" ,
 editable:true, edittype:"select",editoptions: {value:"1:11;2:22"}
Run Code Online (Sandbox Code Playgroud)

提前致谢。

Ole*_*leg 5

您可以插入编辑选项 功能列表中dataInit,设置您需要的宽度。例如

editoptions: {
    value:"1:11;2:22",
    dataInit: function(elem) {
        $(elem).width(50);  // set the width which you need
    }
}
Run Code Online (Sandbox Code Playgroud)