Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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
  #1 (permalink)  
Old January 3rd, 2007, 04:55 PM
Registered User
Join Date: Jan 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Databinding Error

I built a datatable. It only has one row but it has one row of data, i2 results in the number one and I passed the datatable to XML and saw that there is one row of data...

                i2 = dataGridTable.Rows.Count
                dgSelected.DataSource = dataGridTable

What are the possible reasons that my code errors out on the databind? with "Object reference not set to an instance of an object." The datatable is not null...

Thanks for your help...
  #2 (permalink)  
Old January 3rd, 2007, 05:14 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

When you declare your datatable do you do it like this:

Dim dataGridTable as New Datatable() ??

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature

Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding to a Listbox rwebb616 Visual Basic 2005 Basics 1 June 1st, 2008 04:59 PM
DataList DataBinding Error: IndexOutOfRange AnotherAspdotnetDeveloper ASP.NET 2.0 Professional 0 February 20th, 2007 05:51 AM
Databinding getdates moneymk109 ASP.NET 1.x and 2.0 Application Design 1 April 12th, 2006 10:31 PM
Cant fill datagrid with dataset (databinding error Tsjelle Pro VB.NET 2002/2003 1 April 5th, 2004 12:36 PM

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