Click here to Skip to main content
11,640,125 members (68,011 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Android
Hi All,

currently i created a webservice that returning a string in json format. so i want to call this string to my android application and want to display in gridview.how to dot it?plz help me.

this is my output of webservice

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="EmployeeDetails">[{"FirstName":"Allen","LastName":"Mclleum","Age":"32","Designation":"Software Enginner","State":"Washigton"},{"FirstName":"Joe","LastName":"Josh","Age":"19","Designation":"Junior Programmer","State":"Kerala"},{"FirstName":"Vikas","LastName":"Rai","Age":"27","Designation":"Designer","State":"Delhi"},{"FirstName":"Silpa","LastName":"Sharma","Age":"27","Designation":"HR","State":"Mumbai"}]</string>

I have the JsonArray with values. i want to display that values in gridview. for that how to set header and display proper values under header
Posted 4-Jun-13 20:09pm
josh-jw13.6K
Edited 9-Jun-13 23:48pm
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It may not be appropriate to display everything within a grid on a phone device.
The screen size would be too small to show a grid.

However, here[^] is an example of using a grid view in an android device.
  Permalink  
Comments
josh-jw at 10-Jun-13 5:48am
   
I have the JsonArray with values. i want to display that values in gridview. for that how to set header and display proper values under header
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I displayed the response from webservice in listview usiing adapter.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Suvendu Shekhar Giri 225
1 CPallini 192
2 Mika Wendelius 188
3 F-ES Sitecore 150
4 Sergey Alexandrovich Kryukov 139


Advertise | Privacy | Mobile
Web04 | 2.8.150731.1 | Last Updated 13 Jun 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100