获得在jqGrid的一排单击列的值 [英] Getting value of a column on click of a row in jqGrid

查看:140
本文介绍了获得在jqGrid的一排单击列的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Asp.Net/C#,在我的网页我使用的jqGrid 来显示列表中的一个用户的管理​​,该的jqGrid 包含以下几列

I am using Asp.Net/C# , in one of my page I am using jqGrid to display list of users to the Admin , The jqGrid contains following columns


  1. 用户code

  2. 名字

  3. 中东名称


  4. 电子邮件

下面是我的标记

<cc1:JQGrid ID="ModifyAccountUserDetailsjqGrid"    AppearanceSettings-Caption="User Details"         runat="server" Width=800   DataSourceID=ModifyAccountDataSource>
    <Columns>
    <cc1:JQGridColumn HeaderText="User Code" ShowToolTip=false   PrimaryKey=true    DataField="UserCode"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="First Name" ShowToolTip=false    DataField="FirstName"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Middle Name" ShowToolTip=false   DataField="MiddleName"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Last Name" ShowToolTip=false     DataField="LastName"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Email"  ShowToolTip=false        DataField="Email"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Contact No" ShowToolTip=false    DataField="ContactNo"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Division Name" ShowToolTip=false   DataField="DivisionName"></cc1:JQGridColumn>
    <cc1:JQGridColumn HeaderText="Last Name" ShowToolTip=false     DataField="BranchName"></cc1:JQGridColumn>
    </Columns> 
</cc1:JQGrid>

我需要的是管理员点击当行我想要得到的点击row.I的用户code的值是新的的jqGrid ,所以我没有一个明确的想法,我怎么能去这件事。
任何人都可以点我在正确的direction.Any建议都欢迎。

What I require is that when the admin clicks a row I want to get the value of User Code of the clicked row.I am new to jqGrid , so I am not having a clear idea as to how I can go about this. Can anybody point me in the right direction.Any suggestion are welcome.

感谢

推荐答案

最后得到我需要的,我接到的,因此该解决方案是在jqGrid的的Rowselecting事件,我用jqGrid.SelectedRow让我的单元格的值。

Finally to get what I required I got a lot of help from Example , so the solution was on Rowselecting event of the jqGrid , I used jqGrid.SelectedRow to get the value of my cell.

例如:

protected void ModifyAccountUserDetailsjqGrid_RowSelecting(object sender, Trirand.Web.UI.WebControls.JQGridRowSelectEventArgs e)
        {
            ModifyAccountUserDetailsjqGrid.SelectedRow;   
        }

P.S奥列格非常感谢您慷慨help.Much AP preciated。

P.S Oleg thanks a lot for your generous help.Much appreciated.

这篇关于获得在jqGrid的一排单击列的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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