默认选择JqGrid的行 [英] JqGrid's Row selected by default

查看:267
本文介绍了默认选择JqGrid的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想默认设置一个jqgrid的行,并对该事件做些事情.可能吗 ?我正在使用asp.net(C#)和Json

I want to set a jqgrid's row by default and to do something with this event. is it possible ? I'm workin' with asp.net (C#) and Json

推荐答案

您可以使用 loadComplete 内事件.您可以使用 getDataIDs 方法或仅使用data参数 loadComplete .在data.rows中使用标准jsonReader的情况下,您具有从服务器发送的行的数组,如果具有基于0的索引iRow的行,则data.rows[iRow].id是id.方法 loadComplete 参数的确切格式取决于您使用的jqGrid的datatype.

You can use setSelection method of the jqGrid to select a row. The bast place to do this is inside of loadComplete event. You can use getDataIDs method or just use data parameter of loadComplete. In case of usage of the standard jsonReader in data.rows you have the array of rows send from the server and data.rows[iRow].id is the id if the row with the 0-based index iRow. The exact format of data parameter of the method loadComplete depends on the datatype of jqGrid which you use.

这篇关于默认选择JqGrid的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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