0

I need to get the xml node value of a particular rowid in jqgrid,below is the xml structure

<row id="2">
  <cell>2014-10-01</cell>
  <cell>Planning</cell>
  <cell>AG1454245847</cell>
  <cell></cell>
  <cell>Product</cell>
  <group>1</group>
</row>

I retrieved this data by using rawObject parameter in cellattr method,i need to retrieve group node value of row id 2

sanjeeviraj
  • 135
  • 2
  • 10
  • you should include more information about the usage of jqGrid. Which `datatype` you use (`"xml"` or `"local"`/`"xmlstring"`)? **Do you use `loadonce: true` or not?** Are the usage of XML is really required for jqGrid? You generate the data *for jqGrid*. Could you generate JSON data instead? Usage of XML makes your code slowly and the parsing of data in your code more difficult because jQuery not oriented on common XML data. – Oleg Nov 10 '14 at 13:51
  • @oleg I use xml -datatype,loadonce:false,then i Used most of data loading by xml in application.currently trying to generate [this](http://www.ok-soft-gmbh.com/jqGrid/RowSpan2.htm) type of grid by referring [this question code](http://stackoverflow.com/questions/12200621/jqgrid-grouping-row-level-data) – sanjeeviraj Nov 10 '14 at 14:07
  • If you use `datatype: "xml"` and don't use `loadonce: true` then the XML data exists only during filling of the grid. After the grid is filled no XML data exist more on the client side and you can't get it. You still can get the data from HTML table by usage `getCell` or `getRowData` methods. – Oleg Nov 10 '14 at 14:17
  • It doesn't matter which type of data you use more in your application *on the server side*. jqGrid is pure jQuery plugin written in JavaScript and it works *on the client side* in the web browser. The data `...` you created **only for jqGrid**. JavaScript have no common XML parser, especially no which supports XML Schema (XSD). Native serialization is JSON. Usage of JSON in communication **with client side only** will simplify and speed up your code. You don't need change any other parts of your code. – Oleg Nov 10 '14 at 14:23

0 Answers0