The jqxgrid
is set to download the json
data from https://jsonplaceholder.typicode.com
:
source: any =
{
datatype: 'json',
url: "https://jsonplaceholder.typicode.com/users",
cache: false,
datafields: []
}
dataAdapter: any = new jqx.dataAdapter(this.source);
Once the json
data is downloaded it is passed to the jqxgrid
and jqxgrid
is populated with the values.

When the user clicks the table’s row the onCellClick
method is triggered. It is defined in the app.component.ts
script:
onCellClick(event: any): void | boolean {
// console.dir(this.myGrid);
let rowindex = event.args.rowindex;
console.log("rowindex:", rowindex);
let dataindex = this.myGrid.getrowid(rowindex)
console.log("dataindex:", dataindex);
}
As you can see, I have the jqxgrid
object there stored in the this.myGrid)
variable which I queried with:
@ViewChild('myGrid', { static: false }) myGrid: jqxGridComponent;
I am also able to access the row number the user has clicked using:
let rowindex = event.args.rowindex;
In addition, I would like to access all the json
data that was downloaded by the dataAdapter
. Where and how do I access the downloaded data?
Also, I would love to know, how to access the columns values as well. Do I have to access the dataAdapter
?
StackBlitz Project used for this demo
Many thanks in advance!