jqGrid在列标题上单击事件

编程入门 行业动态 更新时间:2024-10-12 05:46:16
本文介绍了jqGrid在列标题上单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用jquery和jqGrid,并且正在寻找oncolumnheader(或类似的东西)click事件.我已经使用了grid的"onSortCol:"属性,但是它没有给我提供单击对象的DOM对象.是否有功能或任何方式将click事件挂钩到jqGrid中的列标题?

I am using jquery and jqGrid and I am looking for an oncolumnheader (or something similar) click event. I have used the "onSortCol:" property of grid but it is not giving me the DOM object on which the click is done. Is there a function or any way to hook click event to a column header in jqGrid?

预先感谢,

推荐答案

列标题是th元素,因此可能很简单:

The column headers are th elements so it will probably be as easy as:

$("#id-of-your-grid th").click(function() {...});

更多推荐

jqGrid在列标题上单击事件

本文发布于:2023-11-05 18:10:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1561506.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单击   事件   标题   jqGrid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!