kumar
kumar

Reputation: 2944

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 type of jQuery grid

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

can anyone help me out..

Thanks

Upvotes: 0

Views: 3746

Answers (2)

Ali Habibzadeh
Ali Habibzadeh

Reputation: 11558

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

Upvotes: 1

Arturo Molina
Arturo Molina

Reputation: 1059

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>"});

Upvotes: 1

Related Questions