【发布时间】:2022-01-20 17:45:56
【问题描述】:
我有一个带有复选框的网格。我试图弄清楚当单击按钮时如何遍历网格以查看选中了哪些复选框。
网格:
$("#dataGrid").ejGrid({
dataSource: dataManager,
allowSelection: false,
allowFiltering: true,
allowTextWrap: true,
allowPaging: true,
filterSettings: {
filterType: "excel"
},
allowSorting: true,
toolbarSettings: { showToolbar: true, toolbarItems: ["search"] },
allowSearching: true,
columns: [
{ type: 'checkbox', width: 50 },
{ field: "Id", visible: false },
{ field: "RegistarName", headerText: "Registrar" },
{ field: "VoterStatus", headerText: "Voter Status" },
{ field: "strTrainedDate", headerText: "Trained" },
{ field: "strOathDate", headerText: "Oath" },
{ field: "Term", headerText: "Term" },
{ field: "OrganizationTypeName", headerText: "Organization Type" },
{ field: "RegistrarOrganizationName", headerText: "Organization" },
{
headerText: "",
template: '<a href="#" onclick="Edit({{:Id}})">Edit</a>',
width: 75,
textAlign: "center"
},
{
headerText: "",
template: '<a href="#" data-url="@Url.Action("Delete")/{{:Id}}" data-name="{{:RegistarName}}" data-toggle="modal" data-target="#confirmModal">Delete</a>',
width: 75,
textAlign: "center"
},
]
});
【问题讨论】:
标签: jquery grid syncfusion