Hi team,
We are following – https://www.htmlelements.com/angular/demos/grid/server-side-paging-sorting-filtering/
we would like to create dynamic columns and data fields (i.e <span class=”pln”>dataFields, columns) means – -> we have columns and datatype field list in backend and we want to use those, instead of static fields like in the example.</span>
We are trying to create the array object dynamiclly but it is failing. Can you suggest the issue
Example –
<div>
<div>this.elements.forEach(element => {</div>
<div>const object= {</div>
<div>label: element.label,</div>
<div>dataField: element.field_name}</div>
<div>}</div>
<div>this.columns.push(object)</div>
<div>const column=element.field_name+’:’+type;</div>
<div>this.dataFields.push(column);</div>
<div>});</div>
</div>
<div>some home it create array of strings. and it does not works</div>