单击行时突出显示 Jqgrid,但不选中多选复选框
Highlight Jqgrid when clicking on row but dont select the multiselect checkbox
在jQgrid中,有没有一种方法可以在不选中多选行复选框的情况下单击一行然后突出显示?
我已经尝试过使用奥列格推荐的 Multiboxonly = true https://stackoverflow.com/a/3719637/853607
任何帮助都会很棒,因为这会阻止关键项目的进展。
也许你打错了。你说多框:是的,但实际上它是多框的:在实现中是真的。如果您使用仅限JavaScript的版本,这应该有效。如果您使用像 ASP.NEt 或PHP之类的包装器,则应查阅这些包装器的文档。
亲切问候
这是我单击一行而不选中复选框但突出显示的行的答案 - 返回 false 可确保不会触发 onSelectRow。 ps @tony 我有小写的多框。
beforeSelectRow: function (rowid, e) {
//debugger;
rowId = rowid;
if ($("#jqg__tradesGrid_" + rowid).attr("disabled") || CommentsClicked) {
CommentsClicked = false;
return false;
}
if (e.target.type == "checkbox") {
var blnChecked = $(e.target).is(":checked");
var trElement = jQuery("#" + rowid, jQuery('#_tradesGrid'));
if (!firstLoadWithRecords) {
updateIdsOfSelectedRows(rowid, blnChecked);
}
if (blnChecked || $.inArray(rowid, idsOfSelectedRows) >= 0) {
trElement.removeClass('ui-widget-content');
trElement.addClass('ui-state-highlight');
} else {
trElement.removeClass('ui-widget-content');
trElement.removeClass('ui-state-highlight');
}
} else {
var blnChecked = $(e.target).is(":checked");
var trElement = jQuery("#" + rowid, jQuery('#_tradesGrid'));
trElement.removeClass('ui-widget-content');
trElement.removeClass('ui-state-highlight');
}
//TODO: put in the style to chagne to silver when the checkbox is checked
CommentsClicked = false;
return false;
},
相关文章:
- jqGrid-当我点击网格中的另一个复选框时,选中多选复选框
- 如何知道JqGrid多选'全选'复选框被选中
- jqGrid如何将多个复选框添加到一列中
- 用户单击多个复选框时的 Jqgrid 警报消息
- 单击行时突出显示 Jqgrid,但不选中多选复选框
- 在jqgrid中选中所有复选框的功能
- 如何在免费的jqGrid 4.13.0中实现单击复选框
- jQgrid:禁用复选框单击,仅在单击复选框时选中复选框
- 如何在单击jqgrid中的行时取消选中复选框
- JqGrid复选框字段实现失败
- 如果选择了current,jqGrid将阻止选择新行&&alert onclick on复选框
- jqGrid-复选框未获得正确的输入值
- JQGRID-保持复选框选择状态-页面刷新/重定向/重新加载
- jqGrid复选框事件
- 将复选框放入单元格jqgrid插件中
- JqGrid复选框通过功能启用/禁用
- jqGrid设置多选复选框id和名称为不同的值
- Jqgrid更新数据库上的复选框单击
- 选中取消选中,选中jqgrid或toggle内部的复选框
- 根据通过json检索到的值,在jqGrid中添加复选框