开发者

Adding Dropdown list to the particular column..using jquery

Hi I need to append the dropdownlist box with certain values to the jquery grid column,

that is default dropdownlist for perticular column....

I am using this t开发者_运维知识库ype of jQuery grid

http://www.trirand.net/demoaspnetmvc.aspx

can anyone help me out..

Thanks


You can pretty much add any html to your data in the grid, for example:

$("#grid").jqGrid('addRowData', 1, {id:"1", name:"Joe Developer", division:"<select><option value='1'>Division 1</option><option value='2'>Division 2</option><option value='3'>Division 3</option></select>"});


Something like will add a select to the forth column of a grid.

 $(function () {
        $.each($('#myTable td:nth-child(4n)'), function () {

            var forthColumn = $(this);

            forthColumn.append('<select/>');
        });
    });

I hope this helps

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜