Thanks for your reply,
I am trying to add the jobhead.createdby field on the work queue in MES. Once I go into customisation and click on the active work grid I can see some fields off the job head table so perhaps I wouldnt need a foreign key view but do not see the created by field as a hidden and therefore am trying to bring it into the grid view. Any help would be appreciated.
Thanks
Regards
Aman
I am trying to add the jobhead.createdby field on the work queue in MES. Once I go into customisation and click on the active work grid I can see some fields off the job head table so perhaps I wouldnt need a foreign key view but do not see the created by field as a hidden and therefore am trying to bring it into the grid view. Any help would be appreciated.
Thanks
Regards
Aman
--- In vantage@yahoogroups.com, bwalker@... wrote:
>
> As I have posted a couple times before - here is code for adding Parent Part to Time Phase grid:
>
> Module Script
>
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents edvTimePhas As EpiDataView
> '// End Wizard Added Module Level Variables **
>
>
> '// Add Custom Module Level Variables Here **
>
>
>
> Sub InitializeCustomCode()
>
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> edvTimePhas = CType(oTrans.EpiDataViews("TimePhas"), EpiDataView)
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
> If Not (edvTimePhas.dataView.Table.Columns.Contains("ParentPart")) Then
> edvTimePhas.dataView.Table.Columns.Add(new DataColumn("ParentPart"))
> End If
> '// End Custom Method Calls
> End Sub
>
> Private Sub edvTimePhas_EpiViewNotification(view As EpiDataView, args As EpiNotifyArgs) Handles edvTimePhas.EpiViewNotification
> '// ** 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.Initialize) Then
> If (args.Row > -1) Then
> AddParentPart()
> End If
> End If
> End Sub
>
> Private Sub AddParentPart()
> For Each dr As DataRow In edvTimePhas.dataView.Table.Rows
> If Not IsDBNull(dr("JobNum")) Then
> dr("ParentPart") = getParentPart(dr("JobNum"))
> End If
> Next
> End Sub
>
> Private Function getParentPart(ByVal job As String) As String
> Dim parentPart As String
> Dim recordSelected As Boolean
> Dim showSearch As Boolean = False
> Dim whereClause As String = "JobNum = '" + job + "'"
> Dim dsJobInfo As DataSet = SearchFunctions.listLookup(TimePhasForm, "JobAsmSearchAdapter", recordSelected, showSearch, whereClause)
> If recordSelected Then
> parentPart = dsJobInfo.Tables(0).Rows(0)("PartNum").ToString()
> Else
> parentPart = ""
> End If
>
> Return parentPart
> End Function
>
> End Module
>
> --- In vantage@yahoogroups.com, "aman" <aman_deep21@> wrote:
> >
> > Hi
> >
> > I am trying to add a new column to a grid view and came across this post. Can someone please help me through this if they have cracked it?
> >
> > Aman
> >
> > --- In vantage@yahoogroups.com, "clive.1972" <clive.1972@> wrote:
> > >
> > > Damn !, I understand the logic there but I agree that's VERY painfull.
> > >
> > > Did you carry on with your potential customisation or scrap it once you found this out ?.
> > >
> > > Thanks.
> > >
> > > --- In vantage@yahoogroups.com, "Thomas, Lynn A." <thomasl@> wrote:
> > > >
> > > > You can't add a column to an existing grid view. I've covered this exact same ground with tech support already, a few months ago. What you have to do is recreate the data view, and add the column[s] you need. Hide the existing grid and replace it with one displaying your custom view data.
> > > >
> > > > Painful, but that's what they told me.
> > > >
> > > > Lynn Thomas
> > > > Senior Engineer
> > > > SAIC
> > > > 317-357-4041 X255
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > >
> >
>