Updating QuoteDtl.ProjectID in Quote entry Form

Hi

Im trying to update the QuoteDtl.ProjectID field from the Quite Entry form. There is already some extensive code in place on the form so i dont want really want to BPM this if possible.

The ProjectID is being selected like this

bool recSelected;
string whereClause = string.Empty;
System.Data.DataSet dsProjectAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "ProjectAdapter", out recSelected, true, whereClause);
System.Data.DataRow adapterRow = dsProjectAdapter.Tables[0].Rows[0];

Im updating a custom field in the QuoteHed like this

EpiDataView edvQH = ((EpiDataView) (this.oTrans.EpiDataViews["QuoteHed"]));
System.Data.DataRow edvQHR = edvQH.CurrentDataRow;

edvQHR.BeginEdit();
edvQHR["Project_c"] = adapterRow["ProjectID"];
edvQHR.EndEdit();

Thid field update works ok but doing something similar for QuoteDtl fails with a ‘Object not set as a reference’ error. Obviously i am not referencing the correct EpiDataView for QuoteDtl so, what is the correct syntax to do the same in the QuoteDtl.ProjectID field?

Thanks

managed to resolve with this

EpiDataView edvQD = ((EpiDataView)(oTrans.EpiDataViews["QuoteDtl"]));
edvQD.dataView[edvQD.Row]["ProjectID"] = adapterRow["ProjectID"];