默认选择JqGrid的行 [英] JqGrid's Row selected by default
问题描述
我想默认设置一个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屋!