开发者

jqGrid onselectrow

I'm using a jqGrid, and it gets populated fine. From the UI perspective, one of the columns in the jqGrid is开发者_开发知识库 editable. How can I make one of the columns as editable (say like a text box)?

The reason is, in my case when the grid successfully loads, the UI is going to show one of the column's values as editable.


If you're looking to edit the column values directly in the grid, similarly to how you might in Excel, look into the inline editing API:

  • http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing&s[]=inline


In colmodel, you have to specify editable: true.Provide edit action link in editURL:... option of jqgrid.


you have to get the "id" of that column and then remove 'disabled' attribute on that.

for example -

$('#idofthatcolumn').removeAttr('disabled');

OR

$('#idofthatcolumn').removeAttr('readonly');


In your colmodel you should specify editable as true i.e, editable:true and specify the editUrl:'localhost:8080/yourApp'

Also if you want to store it in the client side, then specify it as editUrl:'clientArray'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜