Solved

object error

Posted on 2008-06-20
2
176 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

816 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

8 Experts available now in Live!

Get 1:1 Help Now