jqGrid在列标题上单击事件 [英] jqGrid on column header click event

查看:162
本文介绍了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在列标题上单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆