0

I have a grid which data is like this:

Grid rows data

As you can see, there are some rows (0,1,2 and 3 objets) and inside each there are more objects. Please pay attention that there is an object called 'datosPersonales' ('personalData') with has inside more objets; nombre (name), apellido1(firstname) etc.

The problem arise when I try to get the data from one row:

var empleado = $("#GRID_empleado").jqGrid("getRowData",numRow);

What I get is and object with object inside but the the previously mentioned 'datosPersonales' objetc is not a 'father' of more objects. With an image (from firebug) is easier to understand:

Data ungrouped in an object

I don't know why but instead of get 'datosPersonales' with his 'sons' I get them like these:

  • datosPersonales.nombre
  • datosPersonales.apellido1
  • datosPersonales.calle
  • etc

What is the way to get all / whole / raw data from a certain row of a grid or even of the complete grid?

I have tried with some parameters but I've not been successful.

What I want is to get for example the data of [3] in the first image.

Thanks in advance!

Mikel
  • 5,902
  • 5
  • 34
  • 49

1 Answers1

0

You don't posted any code which shows how you use jqGrid. Even such important options of jqGrid like datatype and loadonce are unknown. So I can only guess. I suppose that you create grid with subgrids to display all the data which you posted. I suppose that you use approach close to the way which I described here and here. In the way you can use either getLocalRow or .jqGrid("getGridParam", "userData") instead of getRowData. If you don't know the answers which I referenced I recommend you to read there.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798