Adding Column in Part Attachment Screen


In Part Entry Screen, there is Attachment icon in Menu. When we click, bottom it will open attachment screen with detail of Attachment like xRefNum, Name, Path of documents.
Here, I need to add some more UD column which is add in xFileRef Table.

I tried adding Grid Code using BOReader but its not working bcz this Grid is not initialized as this is runtime form. When we click Attachment Icon then only its coming.

I also tried After Tool click and tried to initialized the Grid but its not working.
If there is any alternate way then would be helpful.

Thank You.

Did you find how to do it? We have a similar requirement and the same thing happens to us.

This is an example f how to add a column to an existing grid. Before you do this always check that the Column doesn’t already exist and is just hidden.

You do have to be carful though, depending on the number of lines you are retrieving it might slow down the form.

//Form Event Wizard -> EpiViewNotification -> Select View
//edvPartTranHist is the view selected in this case.

//Code in Initialize Custom Code
 if (!(edvPartTranHist.dataView.Table.Columns.Contains("Time"))) 
			edvPartTranHist.dataView.Table.Columns.Add(new DataColumn("Time"));
			edvPartTranHist.dataView.Table.Columns["Time"].ExtendedProperties["ReadOnly"] = true;
//Code In event generated by Wizard
//Change NotifyType to Initialize
if ((args.NotifyType == EpiTransaction.NotifyType.Initialize))
			if ((args.Row > -1))
				foreach (DataRowView drV in edvPartTranHist.dataView) 
					DataRow dr = drV.Row;
					dr["Time"] = DateTime.Now.Date.AddSeconds((int)dr["SysTime"]).ToShortTimeString();

Hello Edgar,

This code works when the control is already loaded. But in this case the Attachment Form is not loaded with the main screen (Part Maintenance), even when you click the Attachment Tool the code runs before initialize the grid and sends an error indicating doesn’t find the grid.