jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Problem to display the data using Angular 5
Tagged: angular grid, grid, typescript grid
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 7 years, 4 months ago.
-
Author
-
Hi,
I have a little issue in my jqxGrid.
I’m using a VB’s Web API and its return to me a JSON data.<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> [{"Codigo_Cotacao":1,"itcmCodigo_Mercadoria":1,"itcmDescricao":"Anador","itcmQuantidade":2,"itccValor":10.50,"itccObservacoes":"Teste"},{"Codigo_Cotacao":1,"itcmCodigo_Mercadoria":2,"itcmDescricao":"Paracetomol","itcmQuantidade":2,"itccValor":0.00,"itccObservacoes":""}] </string>
The problem is: when I put the Web API’s link in url, its return to me a 270 empty rows, however, when I use local json-server, the information are displayed.
What should be the problem?Source’s Code
this.source = { datatype: 'json', datafields: [ { name: 'Codigo_Cotacao'}, { name: 'itcmCodigo_Mercadoria'}, { name: 'itcmDescricao'}, { name: 'itcmQuantidade'}, { name: 'itccValor'}, { name: 'itccObservacoes'} ], url: <code>${COTACAO_API}/api/Itens_Cotacao_Mercadoria?codigo_cotacao=${codigo_cotacao}</code> };
Hello kelsey,
It looks like a server issue.
You could check your data indownloadComplete
callback of the DataAdapter.
Also, I would suggest you implement to your DataAdapter theloadError
callback.
For more information, you could visit our API Documentation section.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo,
Thanks for replying, I’ve checked the data in downloadComplete and I’ve received the data, same as posted earlier.
Also, the loadError didnt show anything.Console log of downloadComplete:
[{"Codigo_Cotacao":1,"itcmCodigo_Mercadoria":1,"itcmDescricao":"Anador","itcmQuantidade":2,"itccValor":10.50,"itccObservacoes":"Teste"},{"Codigo_Cotacao":1,"itcmCodigo_Mercadoria":2,"itcmDescricao":"Paracetomol","itcmQuantidade":2,"itccValor":0.00,"itccObservacoes":""}]
Hello kelsey,
You receive this data that you share in the last post when you use url member in the source.
Is this is not what you want? Could you correct me and could you clarify your issue again?Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.