2011-03-01 103 views
2

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

{name:'code',index:'code', width:60, sorttype:"int" , 
editable:true, edittype:"select",editoptions: {value:"1:11;2:22"} 

感谢提前。

回答

4

您可以在editoptionsdataInit功能列表中插入设置您需要的宽度的功能。例如

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