如何使用Jquery从Datagrid的列名帮助获取列索引 [英] How Do I Get A Column Index With The Help Of Column Name From Datagrid Using Jquery

查看:231
本文介绍了如何使用Jquery从Datagrid的列名帮助获取列索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个场景,我需要使用jQuery在Datagrid中使用列名的列的特定索引。

I have a scenario where i need a particular index of a column using column name in the Datagrid using jQuery.

推荐答案

在尝试代码之前,分析渲染浏览器中的HTML。了解您尝试获取的控件和元素是如何组织的。然后它会告诉你如何准确获取索引。请回复我的意见。

Before trying the code, analyze the rendered HTML in browser. See how the controls and elements you are trying to get are organized. Then it would give you the idea how to exactly get the index. Reply me with your observations.
引用:

感谢您的回复Tadit。我能够使用这个元素的类名来解决这个问题。

Thanks for your reply Tadit. I was able to solve this using class name for the element like this.


' #<%= ucProduct.FindControl(m_grid)。ClientID%> tr')。each( function (){

liveFlag =
('#<%=ucProduct.FindControl("m_grid").ClientID%> tr').each(function() { liveFlag =


this )。find(' .SubProductLive')。html();
});
(this).find('.SubProductLive').html(); });



并使用liveflag来实现我的功能。

再次感谢。


and use the liveflag for my funtionality.
Thanks once again.


这篇关于如何使用Jquery从Datagrid的列名帮助获取列索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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