开发者

How to populate a textbox by clicked a row in a jqGrid?

How to populate a textbox by clicked a row in a jqGrid?

Req开发者_如何学运维uirement:

1) I want to populate a textbox with data (e.g. Amount: 600.0) when a row in the above jqGrid is clicked.

Can someone direct me to a tutorial for this ?

Resources looked at:

  • Demos -- Trirand jqGrid for ASP.NET
  • jqGrid Demos

Thanks


You could use the onSelectRow event along with the getCell or getRowData methods:

$('#grid').jqGrid({
    ....
    onSelectRow: function(id) {
        var amount = $('#grid').jqGrid('getCell', id, 'Amount');
        $('#id_of_some_text_box').val(amount);
    },
    ....
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜