How to get rid of this error?

private static void edvPOAllLines_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
	{
		// ** Argument Properties and Uses **
		// view.dataView(args.Row)("[FieldName]")
		// args.Row, args.Column, args.Sender, args.NotifyType
		// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
	
		if (args.NotifyType == EpiTransaction.NotifyType.AddRow ||
args.NotifyType == EpiTransaction.NotifyType.Initialize ||
args.NotifyType == EpiTransaction.NotifyType.DeleteRow ||
args.NotifyType == EpiTransaction.NotifyType.InitLastView ||
args.NotifyType == EpiTransaction.NotifyType.InitAndResetTreeNodes)
		{
			if (args.Row > -1)
			{

view.dataView[args.Row]["Number02"]=(eneLineVolume.Value);
//eneLineVolume is a numeric editor.

			}
			}
		}

Recommended Answers

All 2 Replies

First, you put [code] before your first line of code, then you put [/code] after the last line of your code. That way it will format it in a way that is easy to read (since you want to make things easy for the people who are going to help you).

Then you indicate which of the lines is causing the error. No one wants to study your code to figure out not only the problem, but where the problem is. Again, you want to make it easy on use to answer your question.

Remember, we don't get paid to do this. We do it because we like to. You also want us to like you, so you make things easy for us to do.

Remember one thing :

An object variable might have one of the two values : an object reference or null. So before you start working on object variable please check whether an object variable has null or an object reference.

Exception (Object Reference Cannot set to an instance of an object) will be thrown when you attempt to use an object variable has null.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.