Solved

object error

Posted on 2008-06-20
2
175 Views
Last Modified: 2013-12-16
I am using a view from a different database to populate my datagrid. Once the user hits import button inside the datagrid the record is removed from view. the screen goes through the motions but doesn't remove the record from view and it gives me this error: Object reference not set to an instance of an object.
private void gridImport_ItemCommand(object source, DataGridCommandEventArgs e)

		{

			if(e.CommandName == "import")

			{			

				string proposal_number=e.CommandArgument.ToString();				

				

				TransferProposalPackage(proposal_number + ".pdf");

				ADTransfer.Transfer transfer = new ADTransfer.Transfer(proposal_number,Cycle.ColumnValue.pk_cycle.ToString());

				lblErrMsg.Text=transfer.errMessage;

				bindDataGrid();
 

						

			}			
 

		}

Open in new window

0
Comment
Question by:MoniMatthews
2 Comments
 
LVL 16

Accepted Solution

by:
ororiole earned 500 total points
ID: 21833709
Set a breakpoint at the beginning of the event handler. Its short so you can single step thru it. One of the objects is null. Check their values and see which one it is.
0
 

Author Closing Comment

by:MoniMatthews
ID: 31469249
Thank you for your help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now