Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2006, 08:28 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Bind GridView to Dataset

Hi,
I have a web service that publishes a typed dataset and a method that returns an instance of the typed dataset.
I have a webreference to this service in my asp.net project.
I have tried my version of the example on pge 1038 of ASP.net 2.0 but I just get whitespace not a grid.
I tried dragging an ObjectDatasource onto the form and binding that to the typed dataset but am having trouble getting that to work as well.
The dataset is being filled correctly as the Datatable has a finite record count which can be interrogated by the webpage.

My button code :
Service d = new Service();

        this.GridView2.DataSource = d.GetMeters();//returns typed dataset

        this.GridView1.DataBind();
It is a shame the book did not go into more detail in this area as it seems there are many ways of doing it wrong. I have tried quite a few of them :-)
Thanks
Bob
 
Old November 21st, 2006, 08:57 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Error in my prev post Code should have read:
this.GridView2.DataBind();





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bind Gridview with controls hyder_master .NET Framework 2.0 0 October 5th, 2007 05:01 AM
Beginner :: Need help to bind the data in GridView kajal C# 3 April 3rd, 2007 06:34 AM
Beginner :: Need help to bind the data in GridView kajal ASP.NET 2.0 Basics 2 April 2nd, 2007 01:21 AM
Beginner :: Need help to bind the data in GridView kajal SQL Server 2005 1 March 31st, 2007 04:26 PM
Beginner :: Need help to bind the data in GridView kajal Visual Studio 2005 2 March 31st, 2007 04:26 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.