我想在我的应用程序中添加带有chechbox的多选下拉列表,我添加了它,它完美无缺。启用了多项选择,但它的高度未设置,这是我的观点...请帮助
查看
jQuery(grid_selector).jqGrid({
subGridRowExpanded: function (subgridDivId, rowId) {
},
autowidth: true,
shrinkToFit: true,
url: '@Url.Action("GetAllTasks","AdminIndex")',
datatype: 'json',
mtype: 'GET',
height: 'auto',
colNames:['Task Id ','Project Name', 'Assign To','Task Name','Task Description','Budget','Task Status','Start Date','End Date'],
colModel:[
{name:'Task_Id', key: true,searchoptions: { sopt: ['eq','ne','gt','ge','lt','le']}, index:'id', width:20, sorttype:"int", editable: true, editable: true, sortable: true, search: true, searchrules: { required: true}},
{name:'Project_Name',index:'pid', width:40,search:false,editrules: { required: true},editable: true,formoptions: { rowpos: 2, colpos: 1},editoptions:{size:"1",value: projects}, style: "width: 180px",edittype: "select", stype: "select",dataheight:'auto'},
{name:'User_Email',stype: 'select',index:'email',searchoptions: { sopt: ['eq','ne']},searchoptions:{ value: users }, width:60,editrules: { required: true},edittype: 'select',editable: true,editoptions:{size:5,value: users,dataInit: function (elem) {
setTimeout(function () {
$(elem).multiselect({
header:"Choose an option!",
minWidth: 100, //'auto',
height: 600,
selectedList: 7,
checkAllText: "all",
uncheckAllText: "no",
noneSelectedText: "Any",
open: function () {
var $menu = $(".ui-multiselect-menu:visible");
$menu.width("auto");
return;
}
});
}, 50);
},multiple: true,defaultValue: 'IN'},editrules: { required: true},edittype: "select", stype: "select"},
{name:'Task_Name',index:'tname', width:40,searchoptions: { sopt: ['eq','ne']},editrules: { required: true},editable: true,editoptions:{size:"20",maxlength:"30"},editrules: { required: true}},
{name:'Task_Description',index:'Task_Description',width:90, edittype: "textarea",editoptions:{rows:"3",cols:"21"},search: false,editable: true,editrules: { required: true}, classes: "textInDiv"},
{name:'Task_hrs',index:'taskhrs', width:20,search:false,editrules: { required: true,number:true},editable: true,editoptions:{size:"20",maxlength:"30"},editrules: { required: true}},
{name:'Task_Status',index:'tstatus',searchoptions: { sopt: ['eq','ne']},searchoptions:{ value: getAllSelectOptions() }, width:25, editable: true,search:true,editrules: { required: true}, editoptions:{value: getAllSelectOptions()},edittype: "select", stype: "select"},
{name:'Task_Start_Time',sortable:false,search:false,width:30, editable:true,editrules: { required: true},formatter: "date", formatoptions: { newformat: "d/M/Y "} },
{name:'Task_End_Time',sortable:false,width:30,search:false, editable:true,editrules: { required: true},formatter: "date", formatoptions: { newformat: "d/M/Y "} },
// {name:'CreatedTimeStamp',sortable:false,width:30, editable:false,search:true,editrules: { required: true},formatter: "date", formatoptions: { newformat: "d/m/Y H:m:s"} },
// {name:'ModifyTimeStamp',sortable:false,width:30, editable:false,search:true,editrules: { required: true},formatter: "date", formatoptions: { newformat: "d/m/Y H:m:s"}},
],
});