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
精彩评论