Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 14th, 2008, 03:17 PM
Registered User
 
Join Date: Aug 2008
Location: Boston, MA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.net - Object reference not set to an instance

Hello All,

I'm a relative newbie to asp.net and am having an issue that is getting frustrating. I have page that has an Infragistics UltraWebGrid on it. One of the columns on the grid has a dropdown list. On initial load, it all works great, but on post back I get :Object reference not set to an instance of an object. I put a trace on and can see that it is throwing an "Unhandled Execution Error" at this line:
Quote:
quote:
 at Infragistics.WebUI.UltraWebGrid.UltraGridBand.Syst em.Web.UI.IStateManager.LoadViewState(Object savedState)
Here is the code that seems to be the offender:


Code:
       Dim UnitsCmbAdapt As New SqlDataAdapter(GetMeasureUnits, dbProcurement_DevConnectionString)
        Dim UnitsCmbTable As New DataTable("UnitsCombo")
        Dim UnitsRow As DataRow
        Dim ds As New DataSet
        Dim UnitsValuelist As New Infragistics.WebUI.UltraWebGrid.ValueList()

        UnitsCmbAdapt.Fill(UnitsCmbTable)
        If Not IsPostBack() Then
            For Each UnitsRow In UnitsCmbTable.Rows
                UnitsValuelist.ValueListItems.Add(UnitsRow("unitLiteral").ToString())
                UltraWebGrid1.DisplayLayout.Bands(0).Columns(2).ValueList = UnitsValuelist
            Next
            UltraWebGrid1.DataBind()
            UltraWebGrid1.DisplayLayout.CellClickActionDefault = Infragistics.WebUI.UltraWebGrid.CellClickAction.Edit

        End If
I need the "ViewState" set to true as I need to hold the values of some of the form controls. I've spent a lot of time looking into this and think that I am not instantiating something correctly - but I'm not sure. I did not post this on the Infragistics forums as I don't believe the grid is the issue itself.

I truly appreciate any help you can give!

JCCDEVEL

Reply With Quote
  #2 (permalink)  
Old August 30th, 2008, 09:25 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Bangalore, Karnataka, India.
Posts: 231
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can check demo code of infragistic

thanks......
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Object reference not set to an instance of an obje rturner003 ASP.NET 2.0 Professional 0 December 26th, 2006 07:30 PM
Object reference not set to an instance of an obj nrathod_97 BOOK: Beginning VB.NET Databases 4 June 21st, 2005 06:35 PM
Object Reference is Not Set to an Instance of an O blackinwhite General .NET 4 February 1st, 2005 04:42 AM
Object reference not set to an instance... steelman BOOK: ASP.NET Website Programming Problem-Design-Solution 6 May 7th, 2004 02:03 AM
Object reference not set to an instance of an obje douknownam BOOK: Beginning ASP.NET 1.0 1 December 18th, 2003 01:56 PM



All times are GMT -4. The time now is 04:37 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.