jqGrid addRowData - how to add custom name/id to each row?

This forum was posted on Wednesday, March 20, 2013 3:58:08 PM

The id is presently based on the row number but i wish to update the id to a custom definition based on a variable in my mydata array.
For illustration if my mydata array was so:
var mydata = { id="1"  name="someName"  type="typeOne" } 

I would want my HTML o/p to seem like this:


How can i go about making confirm addRowData method adds a custom id to my rows Rather of the regular rowid?
Thank You!

I am just starting out with jqGrid so sorry if it is an obvious problem (though I could not find the solution on their site anywhere).
I am using the below method to add row data to my grid presently:
for (var i = 0; i <= mydata.length; i++) {
jQuery("#grid2").jqGrid('addRowData' i + 1 attributesi);

And the resulting HTML is this:
 Views 493 Get Source Code >>
Related Tags:

Replies on "jqGrid addRowData - how to add custom name/id to each row?" :

Nobody has replied on this post , be first to post answer.

Post Your Answer/Comment:

Please Login first to post Reply !

Note: Please Put Code into <code></code> block.

Threads related to "jqGrid addRowData - how to add custom name/id to each row?":