Recent posts:
Recent replies:

Hi Neerav,

No, I am returning it as a JSON string.

something on the lines of

ClassMethod GetDetails ()
set result = []
&sql(declare a1 cursor for select ID, GName, DOB into :id, :gName, :dob from MyPackage.MyClass)
&sql(open a1)
&sql(fetch a1)
set rec={"rid"(rid)"gName":(gName)"dob":(dob)}
do result.%Push(rec)
// do result.$push(rec) ; for older version of cache
&sql(close a1)
quit result.%ToJSON()
// quit result.$toJSON() ; for older verions}



Hi Neerav,

You could try  This is quite fast and responsive.  I have tested over 10000 records.  It supports bootstrap as well.

Please find some code to get you started.  There are lots of examples in the documentation.


        <link href="" rel="stylesheet">
        <script type="text/javascript" src=""></script>



<div><table id="tblAbcd"></table></div>

<script language ="javascript" >

     var ret #server(MyPackage.MyClass.GetDetails()#;
     var retJSON JSON.parse(ret);

     var ht=600;

     var pageRows = 50

     var  table = new Tabulator("#tblAbcd", {
          data:retJSON,           //load row data from array
          layout:"fitColumns",      //fit columns to width of table
          responsiveLayout:"hide",  //hide columns that dont fit on the table
          tooltips:true,            //show tool tips on cells
          addRowPos:"top",          //when adding a new row, add it to the top of the table
          history:true,             //allow undo and redo actions on the table
          pagination:"local",       //paginate the data
          paginationSize:pageRows,         //allow 7 rows per page of data
          movableColumns:true,      //allow column order to be changed
          resizableRows:true,       //allow row order to be changed
          initialSort:[             //set the initial sort order of the data
               {column:"gstName", dir:"asc"},
          columns:[                 //define the table columns
              {title:"Id", field:"id",visible:false},
              {title:"Name", field:"gstName", editor:"input", headerFilter:"input",sorter:"text"},
              {title:"DOB", field:"dobDt", editor:"input",headerFilter:"input",sorter:"date"},               




Hope this helps


Thanks Robert,

Did some tinkering with " OUTPUTTYPEATTRIBUTE" ," ELEMENTQUALIFIED" and " SUPPRESSTYPEPREFIX" and got rid of most of the of the prefix and xsitype



Anil has no followers yet.
Anil has not followed anybody yet.
Global Masters badges:
Anil has no Global Masters badges yet.