Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7958605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:26:53+00:00 2026-06-04T04:26:53+00:00

I have my web service to retrieve the data, my issue is I am

  • 0

I have my web service to retrieve the data, my issue is I am using a gridview to output the data and I get all of the fields from the table I only want a select few, how can I do this?

Heres my code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class _Default : System.Web.UI.Page
{

public static DataSet ds;

protected void Page_Load(object sender, EventArgs e)
{
    localhost.Service1 myws = new localhost.Service1();
    ds = myws.GetDataSet();
    GridView1.DataSource = ds;
    GridView1.DataBind();
}
}

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:26:54+00:00Added an answer on June 4, 2026 at 4:26 am

    You can edit the Datagrid to show only the columns you want shown by using the Datagrid designer and dataitem attributes of each result row….

    Click on the Arrow then select edit columns add a bound column for each column you want to display the column name must be the same as the name of the field in the database.

    Make sure you set the datagrid to AutoGenerate columns = false.

    your emitted html code should look something like this:

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
            <Columns>
                <asp:BoundField DataField="DatabaseColumn1" /> Where DatabaseColumn1 is the name of the field you wish to display.
                <asp:BoundField DataField="DatabaseColumn2" />
            </Columns>
    
        </asp:GridView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've done a chunk of work to retrieve some data from a web service
I have a python script that retrieves information from a web service and then
I have a web service that stores data in a local SQL Server 2008
I have been having some issues retrieving JSON data from a WCF service application
I have a working PHP web service that returns data (if I input the
Does anyone have any idea how to retrieve deleted records data from Apex data
I have a PHP SOAP web service, using CakePHP, which is returning a variable
I have tried to use the following code to retrieve the data from the
I am trying to build a web service in .NET, which will retrieve data
We have a ReST Web Service that uses POST - to insert data into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.