0

If have an XML file that jqGrid is reading. I want to set attributes in the class using attributes in the XML file. For example, given a file such as this:

<row id='0'>
  <cell class='type1'>2</cell>
  <cell class='type2'>2</cell>
</row>

I'd like the CSS to be such that the first cell has 'class="type1"' and the second cell to have 'class="type2"'.

I have been using cellattr_func to try and set these values, but it is only passed in the value of the cell, which isn't enough to determine the CSS class to be used in my use case. I've been inspecting the 'rawObject' parameter, which seems like it might have the information from the XML data attributes, but I don't know how to walk through the rawObject data structure successfully in Javascript to determine if what I want to do is possible or not.

Wheat
  • 845
  • 4
  • 12
  • Look at [the answer](http://stackoverflow.com/a/8022860/315935). I think you will find the answer on your question here. – Oleg Apr 02 '14 at 20:49
  • Oh perfect, that's what I need! I was looking all over for that! – Wheat Apr 02 '14 at 22:50

0 Answers0