Skip to Main Content

APEX

Load Json into interactive grid via js

FrankkJun 10 2019 — edited Jun 10 2019

Hi, i want to load json /array into interactive grid via js.

For grid i see that u can do something like the code below but i want use the interactive grid component for allow users search/order/inline edition.

https://docs.oracle.com/en/database/oracle/application-express/19.1/aexjs/grid.html

var fieldDefinitions = {

    id: {

        index: 0,

        heading: "Id",

        seq: "1"

    },

    name: {

        index: 1,

        heading: "Name",

        seq: "2"

    }

};

var data = [

    ["1022", "Betty"],

    ["1023", "James"],

    ...

];

apex.model.create( "myModel", {

    recordIsArray: true,

    fields: fieldDefinitions

}, data );

$( "#myGrid" ).grid( {

    modelName: "myModel",

    columns: [  fieldDefinitions ]

} );

Comments
Post Details
Added on Jun 10 2019
3 comments
646 views