on 06-02-2015 6:15 AM
Hi ,
how to get the list of column names of a particular entity from the metadata of an xsodata call. can anyone provide me solution for this and the way to approach for this method??
Regards
Raghu M
Hello Raghu,
you can use method getServiceMetadata of the ODataModel (OpenUI5 SDK - Demo Kit).
In the returned object you can access the entity types array by dataServices.schema[0].entityType. For each entity type array a property array exists which contains the names of the properties (="columns").
Here an example using the northwind service.
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try this.
var oTable = detailView.getView().byId('idItemTable');
var dataToExport = detailView.getView().getModel().getData();
var colNames = [];
var colDetails = [];
oTable.getItems()[0].mAggregations.cells.map(function(item,index){
colDetails.push(item.mBindingInfos);
});
oTable.getColumns(true).map(function(item,index){
colNames.push(item.getHeader().getText());
});
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.