Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 March 31st, 2005, 03:00 AM
Authorized User
 
Join Date: Nov 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Navigation in Datagrid

I have placed a datagrid on VB.NET form. It displays data when I click on + sign and Table name.

However, I want to display data directly as soon as the form opens without navigation.

Can anybody tell how to do that?

 
Old March 31st, 2005, 12:11 PM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 224
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to ashu_from_india Send a message via Yahoo to ashu_from_india
Default

hi anita

use DataGrid.DataSource = DataSet.Tables("TableName")

i hope it will help

 
Old April 16th, 2005, 07:23 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Anantsharma Send a message via Yahoo to Anantsharma
Default

HI,

When you assign a DataSet as DataSource propert of DataGrid, it actually attaches it with the DataTables Collection. DataGrid is confused, which Table you want exactly. So it displays to choose.

So you haveto tell it explicitly the table name a


 ObjDGrid.DataSource=ObjDataSet.Tables(0)

OR u can use this also

 ObjDGrid.DataSource=ObjDataSet.Tables("DataTableNa me")

Then use

 ObjDGrid.Expand (-1) ''This will expand all the rows if u have used datarelation inside dataset

Hope this helps





Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigation - ch7. wingri BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 April 8th, 2008 08:29 AM
Navigation sg48 ASP.NET 2.0 Basics 2 February 13th, 2008 12:18 PM
Navigation volsha Dreamweaver (all versions) 1 July 20th, 2007 03:19 PM
navigation nidheeshkayal ASP.NET 2.0 Basics 0 March 16th, 2006 07:05 AM
Navigation JonnyRPI HTML Code Clinic 1 July 6th, 2003 05:33 AM





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