Extended Properties and Views

Hello Everyone,

I have assembled a simple script to populate a ultragrid with job
information. What I need is to get rid of the irrelevant columns to
clean up the view.

I have tried the extended properties examples but I am not using a
view in the same manner as the example plus I am filtering. My
working code is below. The extended property example is appended
after the code.

My dataset is using the JobEntryAdapter to filter the appropriate
jobs. How do I create the bridge back to the extended properties
view being used? At the very minimum I would like to hide the VB UDF
fields.

Thanks,
Ross

--------------------
'//**************************************************
'// Custom VB.NET code for CustomerTrackerForm
'// Created: 9/19/2008 9:50:28 AM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script


'// ** Wizard Insert Location - Do Not Remove 'Begin/End
Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **

Dim recSelected as Boolean
Dim whereClause as String
Dim dsCustomerJobs As DataSet
Dim CustomerView As EpiDataView
Dim CustID As String

Sub InitializeCustomCode()


'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization

'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls
'// End Custom Method Calls


End Sub


Sub DestroyCustomCode()


'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal

'// End Custom Code Disposal
End Sub



Private Sub btnCustomerJobs_Click(ByVal Sender As Object,
ByVal Args As System.EventArgs) Handles btnCustomerJobs.Click
'// ** Place Event Handling Code Here **

'// Get Customer ID
CustomerView = CType(oTrans.EpiDataViews("Customer"),
EpiDataView)
CustID = CustomerView.dataView(CustomerView.Row)("CustID")

'//Create Data Set of Customer Jobs
whereClause= "ShortChar01 = '" & CustID & "'"
dsCustomerJobs = SearchFunctions.listLookup
(otrans, "JobEntryAdapter", recSelected, False, whereClause)

'//Load the Grid
If(recSelected) Then
ugdCustomerJobs.DataSource = dsCustomerJobs

End If

End Sub


End Module

---------------------
Extended Properties Example:

Sub InitializeCustomCode()

'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added
Variable Initialization' lines **
'// Begin Wizard Added Variable Initialization

'// End Wizard Added Variable Initialization
'// Begin Custom Method Calls

SetExtendedProps()

'// End Custom Method Calls
End Sub


Private Sub SetExtendedProps()
'// Customization to set extended properties
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("CntryList"),
EpiDataView)

If edv.dataView.Table.Columns.Contains("BorderCrossing") Then
edv.dataView.Table.Columns("BorderCrossing").ExtendedProperties
("IsHidden") = true
End if
End Sub