Passing a dataview from Parent and Child Form

I am using aa example posted by Aaron_Moreng to pass a dataview from the QuoteForm to the QuotePrintForm.

In QuotePrintForm (the receiving form):is suppose to receive a picklist data view from Quote Entry, Converts the dataview to a datatable, then use as source table for a grid.

I am not getting any errors, the grid shows the correct column header list but its always empty with now rows. The Quote Entry picklist is not empty.

Any help would be appreciated.

Thx,

QuotePrintForm code:

Blockquote

edvCustomView = (EpiDataView) QuotFormForm.LaunchFormOptions.ContextValue; // This is the Quote pick list from the Quote Entry

		MassPrint_Grid.DataSource = null;
		MassPrint_Grid.ResetDisplayLayout();
		MassPrint_Grid.Layouts.Clear();

		DataTable QuoteList_tbl = this.edvCustomView.dataView.Table.Clone();

//DataTable dtOrderDtl = this._edvOrderDtl.dataView.Table.Clone();

		// Put the dataview contents in the Grid. 
		rsiMassPrint_Grid.DataSource = QuoteList_tbl;

‘’
Calling form Quote Entry:

``
EpiDataView edvQuoteListData = ((EpiDataView)(this.oTrans.EpiDataViews[“QuoteList”]));
System.Data.DataRow edvQuoteListDataRow = edvQuoteListData.CurrentDataRow;

		if (edvQuoteHedData.Row > -1) 
		{
			//var test = edvCallContextBpmDataRow["ShortChar02"].ToString();
			//var Quote = edvHDCaseQuoteDataRow["QuoteNum"].ToString();
		
			//MessageBox.Show(Quote);
		
			LaunchFormOptions lfo = new LaunchFormOptions();
		

		    lfo.ContextValue =edvQuoteListData;
			lfo.SuppressFormSearch = false;
		
			// Call MES Work Queue
			// ProcessCaller.LaunchForm(oTrans,"DEGO1080", lfo); 
		
			
			ProcessCaller.LaunchForm(oTrans,"RPTQFMPR", lfo);

Blockquote

It started working after I changed the line:

Blockquote

DataTable QuoteList_tbl = this.edvCustomView.dataView.Table.Clone();

to

DataTable QuoteList_tbl = this.edvCustomView.dataView.Table

Blockquote

1 Like