Click here to Skip to main content
13,193,970 members (48,702 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am new in android. I am using web service in android and i want to display data in gridview.plz help me.
Posted 4-Apr-11 0:10am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

have you taken a look at this?

Android GridView[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

First create the Class with necessary properties which the web service gives you.

Ex. if web service giving you dataset of employee the create class like below with getter and setter methods.

public class Employee {
	private String EmployeeID;
	private String Name;
	private String Genre;
	private String Email;
	public String getEmployeeID() {
		return EmployeeID;
	public void setEmployeeID(String EmployeeID) {
		this.EmployeeID = EmployeeID;
	public String getEmail() {
		return Email;
	public void setEmail(String Email) {
		this.Email = Email;
	public String getName() {
		return Name;
	public void setName(String Name) {
		this.Name = Name;

Then make a Arraylist of "Employee" class like

ArrayList<employee> emplist=new ArrayList<employee>();</employee></employee>

Extract data from your web service responce to new object of "Employee" and then add that object to ArrayList

Then make the BaseAdapter and bind it to gridview like

AArjun24 5-Apr-12 0:42am
I can create a class with getter and setter method.but i dont understand how can i
Extract data from my web service responce to new object my Class.plz give me steps to extract data into my class and how can i bind it to gridview
beniv 22-Oct-13 4:37am
did you resolve this i have the same problem

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171018.2 | Last Updated 25 Nov 2011
Copyright © CodeProject, 1999-2017
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