Solved

object error

Posted on 2008-06-20
2
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
reading excel file in .net 2 46
Import a excel sheet in a grid 2 45
How do i create a simple array in a public class? 6 37
Need a quick overview of Selenium testing 2 36
IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 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