Reference Column and Row in Data View

Can you reference a Column in a BAQ DataView as a parameter in a Dynamic Query? I don’t know what I have wrong but it is throwing an error. I don’t think I’m calling the dataView correctly.

MessageBox.Show("Change Order Number Start");
		tbOrderCancelled.Visible = false;
		tbOrderEditCompleted.Visible = false;
		MessageBox.Show("Change Order Number Lines");
		//Order Lines
		DynamicQueryAdapter dqa = new DynamicQueryAdapter(oTrans);
		QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("GS_Orders_Lines");
		qeds.ExecutionParameter.AddExecutionParameterRow("OrderNum", edvMyCustomOrderDV.dataView[edvMyCustomOrderDV.Row]["OrderNum"].ToString() , "nvarchar", false, Guid.NewGuid(), "A");
		dqa.ExecuteByID("GS_Orders_Lines", qeds);
		gridLinesCopyChanges.DataSource = dqa.QueryResults.Tables["Results"];

What’s the error?


It’s after the Message Box “Change Order Number Start”)

I’m trying to change all my references to the controls to the actual BAQ DataView Columns

That means that your


Either doesn’t exist or doesn’t have a value.

Okay, so I am referencing it correctly?

Seems fine but it is telling you that it doesn’t have a Row or a Value.

How is this dataview instantiated?