I used setRowData in gridComplete to add two buttons to a column called "Actions" in my JQGrid. It works perfectly however due to a recent change, I had to switch from passing in html to setRowData to somehow passing in two buttons objects... After the change, setRowData result in [object Object] being displayed in the column... I was just wondering what is the best way to add two button objects to a column in jqGrid? Should I use SetCell instead?
Thanks, HS
Edited: Thank you for your replies guys. However I am not sure I follow your answers... maybe I didn't describe the probably clearly... I followed the approach in this post to add my buttons to the Action column. However due to a recent change, I had to create my buttons like this:
acceptButton = $('<button class="ui-state-default ui-corner-all"><span class="ui-button-text">Accept</span></button>',{click:function(){ AcceptNewValue(gridId,currentRow["UserID"],'') }});
rejectButton = $('<button class="ui-state-default ui-corner-all"><span class="ui-button-text">Reject</span></button>', {click:function(){ RejectNewValue(gridId,currentRow["UserID"],'') }});
The question is how do I now add both buttons to the "Action" column of my grid? Two buttons should appear on all rows...Different UserID will be passed into the click functions when buttons from different rows are clicked.
Thanks, HS