当使用 jqGrid 内置的列搜索功能时,dropdwonlist 拒绝显示特殊字符,例如 ç、Ë 等。由于某种原因,它们被分成两行。这意味着如果我们使用单词“Dfëstuç”,下拉列表或更确切地说选项列表将如下生成:
dfe
不明确的
灰泥
不明确的
我的代码如下:
@model WS.ViewModels.CaseViewModel
@{
ViewBag.Title = "";
Layout = "~/Views/Shared/_Layout.cshtml";
<meta charset="utf-8">
string idVendbanimiSelectValues = ":";
foreach (var item in Model.NomenklaturaVendbanimiDropDownListData.OrderBy(n => n.IdVendbanimi))
{
idVendbanimiSelectValues += ";" + item.IdVendbanimi + ":" + item.EnPershkrimi;
}
}
@section AdditionalCss {
@Styles.Render("~/Content/Styles/ui.jqgrid.min.css")
}
@section AdditionalJavaScript {
@Scripts.Render("~/bundles/jqgrid")
@Scripts.Render("~/Scripts/jqgrid-listsearch.js")
@Scripts.Render("~/Scripts/jquery.searchFilter.min.js")
<script type="text/javascript">
$(function () {
var idVendbanimiSelectValues = "@idVendbanimiSelectValues";
$('#list-grid').jqGrid({
url: '/Lenda/GridDataWithFilters/',
datatype: 'json',
mtype: 'GET',
colNames: ['CaseId','IdVendbanimi'],
colModel: [
{ name: 'CaseId', index: 'CaseId', align: 'right' },
{ name: 'IdVendbanimi', index: 'IdVendbanimi', align: 'left', stype: 'select', edittype: 'select', editoptions: { value: idVendbanimiSelectValues }, autoencode: false }
],
pager: $('#list-pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'CaseId',
sortorder: "asc",
viewrecords: true,
height: '100%',
width: '1200',
ignoreCase: true,
autoencode: true,
})
慕尼黑的夜晚无繁华
相关分类