English 中文(简体)
jqGrid onselectrow
原标题:jqGrid onselectrow
  • 时间:2010-02-16 21:35:34
  •  标签:
  • jqgrid

我正在使用jqGrid,并且它被成功地填充。从用户界面的角度来看,jqGrid中的一列可编辑。我该如何使其中一列可编辑(比如像一个文本框)?

原因是,在我的情况下,当网格成功加载时,用户界面将显示一个列的可编辑值。

问题回答

如果您想直接在网格中编辑列值,就像在Excel中一样,请查看inline编辑 API:

在colmodel中,您必须指定 editable: true。在jqgrid的 editURL:... 选项中提供编辑操作链接。

你必须获取该列的“id”,然后移除其中的“disabled”属性。

例如 - (lì rú - in simplified Chinese)

$( #idofthatcolumn ).removeAttr( disabled );

或者

$( #idofthatcolumn ).removeAttr( readonly );

在您的 colmodel 中,您应指定 editable:true ,即 editable:true ,并指定 editUrl: localhost:8080/yourApp

而且如果您想将其存储在客户端上,则将其指定为 editUrl:clientArray





相关问题
Retrieving original row data from jqGrid

It is possible to use the getRowData method to retrieve the current of a cell but this retrieves the current cell content rather than the original data before it went through the formatter. How do I ...

How to programmatically select top row of JQGrid?

How does one programmatically select the top row of a JQGrid. I want to have the top row already selected when it is opened on the page. My grid is sorted by a descriptive column so the first row s id ...

Blank when NaN in jqGrid cells

How to set blank instead of NaN in jqGrid cells ? Using formatter ? Is there an example?

complete jqGrid?

Please, can anyone tell me how to use jqGrid? I want to do edit, add & delete functionality. Also I want to show an image in the grid Please tell me, what can I do, and how can I do?

jqGrid: is there an event for when columns are reordered?

I m using the column reordering feature in jqGrid $grid = jQuery("#list").jqGrid({ sortable:true, ... }); Is there an event that fires after columns are re-ordered? If there is, I can t see ...

Wrapping Text lines in JqGrid

Can you get lines of text to wrap in JqGrid? I have had a look round but i can t find anything.

using jqgrid style for usual Table in asp.net mvc

I d prefer using Table and td instead of JqGrid but i like JqGrid styles. has anyone used jqgrid style for usual Grid of asp.net MVC(i mean Table and td) before?

热门标签