EpiUltraGrid Blank Title 89302

You should be able to hide a Column in an EpiUltraGrid by just checking the hidden box for the Field in the Column Properties. If you can't change it, then try using extendedproperties. The code is like this:
edv.dataView.Table.Columns("UnitCost").ExtendedProperties("IsHidden") = True
This is from a document I got from Epicor. Here is the whole thing:
Â
Â
Summary: CUST In UltraGrid the Format Property change doesn't hold. WorkAround
Book: Support Solutions
Page: 3740ESC
Â
The detailed information provided below is a template example. The idea is that this will be modified or changed by the customer to fit their business needs. The examples we provide have not been through a standard QA process. These modifications should be evaluated and tested thoroughly in a training account prior to implementation in a production environment. Code is not developed or implement directly in Support Services. Examples are provided where possible. Further assistance may be necessary to build from this example or implement it. If this goes beyond the scope of what the customer is comfortable with and what is handled in Support, we will discuss bringing in our programming services department to follow-up.
Â
Page No: 3740ESC
Â
Answerbook: CUST: In UltraGrid the Format Property change doesn't hold. WorkAround
Note: Issue to be address/resolved in Epicor 9.
Â
I'm adding the Unit Cost to the ultragrid in Requisition Entry. I also need to change the format from 4 decimails to 2 decimails. But the format changes will not hold after the cusotmization is saved. Why? Need a workaround.
Â
The reason why the "Format" property does not work correctly with our framework is because our properties are data oriented and not control oriented. The "Format" is being overrided by the framework.
Â
The workaround is to set the "Format" extended property in InitializeCustomCode. This is done by creating a private subroutine that sets the Format extended property in the script wizard. The subroutine needs be called from the InitializeCustomCode() method.
Â
You will need to copy and paste the following sub into the script wizard for the Requisition Entry. To do this:
1) Set the developer mode on.
2) Navigate to Material Management > Purchase Management > General Operations > Requisition Entry.
3) In the UI form select Tools > Customization and select the Scrip Editor tab.
4) Copy and Paste the following code just above the "End Module" statement.
Private Sub SetExtendedProps()
'// Get reference of EpiDataView
Dim edv As EpiDataView = CType(oTrans.EpiDataViews("ReqDetail"), EpiDataView)
If edv.dataView.Table.Columns.Contains("UnitCost") Then
'// change the Columns Formatting
edv.dataView.Table.Columns("UnitCost").ExtendedProperties("Format") = ">,>>>,>>>,>>>9.99"
'// to make readonly
'edv.dataView.Table.Columns("UnitCost").ExtendedProperties("ReadOnly") = True
'// or to make invisible...
'edv.dataView.Table.Columns("UnitCost").ExtendedProperties("IsHidden") = False
End if
End Sub
5) Now add the call to this sub to the Initialize CustomCode() routine. The call in InitializeCustomCode() would look like.
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
SetExtendedProps() '<==== I added this line
'// End Custom Method Calls
End Sub
--------------------------------------------------------




________________________________
From: drew.pete <drew.pete@...>
To: vantage@yahoogroups.com
Sent: Fri, April 9, 2010 2:16:04 PM
Subject: [Vantage] Re: EpiUltraGrid

Â
Would it be pretty much the same to hide a column? I have some code right now that uses an adapter to provide a datasource to an ultragrid. It gets populated by button click but I am unable to modify any column properties for the grid. Alternatively I was looking for code to hide columns.

Would it pretty much be on the same type of event described below and instead I would say...

Args.column( "column_name" ).Hidden = true

?

Thanks,

Drew

--- In vantage@yahoogroups .com, Steven Gotschall <sgotschall@ ...> wrote:
>
> Here is some code I got a while back that hides Parts in an UltraGrid when the RevShortDesc is "Obsolete". Hope it helps.
>
> > '//********* ********* ********* ********* ********* *****
> > '// Custom VB.NET code for PartForm
> > '// Created: 7/22/2008 6:29:37 PM
> > '//********* ********* ********* ********* ********* *****
> > Imports System
> > Imports System.Data
> > Imports System.Diagnostics
> > Imports System.Windows. Forms
> > Imports System.ComponentMod el
> > Imports Microsoft.VisualBas ic
> > 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 **
> > Private WithEvents gRevisions As EpiUltraGrid
> >
> > Sub InitializeCustomCod e()
> >
> > '// ** 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 PartForm_Load( ByVal sender As object, ByVal args As
> EventArgs)
> > Handles PartForm.Load
> > '//
> > '// Add Event Handler Code
> > '//
> > gRevisions =
> > CType(csm.GetNative ControlReference ("86fb7bf3- f52e-4d9a- 9d96-
> 30551ee51ecf" ),
> > EpiUltraGrid)
> >
> > End Sub
> >
> > Private Sub gRevisions_Initiali zeRow(ByVal Sender As Object, ByVal
> Args As
> > Infragistics. Win.UltraWinGrid .InitializeRowEv entArgs) Handles
> > gRevisions.Initiali zeRow '// you will need to create an event
> handler for
> > each grid you specified above
> > '// ** Place Event Handling Code Here **
> > If Args.Row.Band. Index = 0 Then
> >
> > If Args.Row.Cells( "RevShortDesc" ).Value = "Obsolete" Then
> > Args.Row.Hidden = True
> > End If
> > End If
> > End Sub
> >
> > End Module
>
>
>
> ____________ _________ _________ __
> From: Kunal Ganguly <kunal_vantage@ ...>
> To: Vantage Yahoo Group <vantage@yahoogroups .com>
> Sent: Fri, April 9, 2010 9:54:33 AM
> Subject: [Vantage] EpiUltraGrid
>
> ÂÂ
> Is there a way to set a filter on a EpiUltraGrid?
>
> Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.
>
> Thanks,
> Kunal
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>


Â




[Non-text portions of this message have been removed]
Is there a way to set a filter on a EpiUltraGrid?

Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.

Thanks,
Kunal





[Non-text portions of this message have been removed]
Here is some code I got a while back that hides Parts in an UltraGrid when the RevShortDesc is "Obsolete". Hope it helps.

> '//**************************************************
> '// Custom VB.NET code for PartForm
> '// Created: 7/22/2008 6:29:37 PM
> '//**************************************************
> 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 **
> Private WithEvents gRevisions As EpiUltraGrid
>
> 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 PartForm_Load(ByVal sender As object, ByVal args As
EventArgs)
> Handles PartForm.Load
> '//
> '// Add Event Handler Code
> '//
> gRevisions =
> CType(csm.GetNativeControlReference("86fb7bf3-f52e-4d9a-9d96-
30551ee51ecf"),
> EpiUltraGrid)
>
> End Sub
>
> Private Sub gRevisions_InitializeRow(ByVal Sender As Object, ByVal
Args As
> Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles
> gRevisions.InitializeRow '// you will need to create an event
handler for
> each grid you specified above
> '// ** Place Event Handling Code Here **
> If Args.Row.Band.Index = 0 Then
>
> If Args.Row.Cells("RevShortDesc").Value = "Obsolete" Then
> Args.Row.Hidden = True
> End If
> End If
> End Sub
>
> End Module



________________________________
From: Kunal Ganguly <kunal_vantage@...>
To: Vantage Yahoo Group <vantage@yahoogroups.com>
Sent: Fri, April 9, 2010 9:54:33 AM
Subject: [Vantage] EpiUltraGrid

Â
Is there a way to set a filter on a EpiUltraGrid?

Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.

Thanks,
Kunal

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
And this is why i LOVE this group!! :D

Thanks a ton Steven!! Will let you know if I have any followup questions.

BTW, do you guys have the dev kit?

Kunal




________________________________
From: Steven Gotschall <sgotschall@...>
To: vantage@yahoogroups.com
Sent: Fri, April 9, 2010 9:01:27 AM
Subject: Re: [Vantage] EpiUltraGrid


Here is some code I got a while back that hides Parts in an UltraGrid when the RevShortDesc is "Obsolete". Hope it helps.

> '//********* ********* ********* ********* ********* *****
> '// Custom VB.NET code for PartForm
> '// Created: 7/22/2008 6:29:37 PM
> '//********* ********* ********* ********* ********* *****
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows. Forms
> Imports System.ComponentMod el
> Imports Microsoft.VisualBas ic
> 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 **
> Private WithEvents gRevisions As EpiUltraGrid
>
> Sub InitializeCustomCod e()
>
> '// ** 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 PartForm_Load( ByVal sender As object, ByVal args As
EventArgs)
> Handles PartForm.Load
> '//
> '// Add Event Handler Code
> '//
> gRevisions =
> CType(csm.GetNative ControlReference ("86fb7bf3- f52e-4d9a- 9d96-
30551ee51ecf" ),
> EpiUltraGrid)
>
> End Sub
>
> Private Sub gRevisions_Initiali zeRow(ByVal Sender As Object, ByVal
Args As
> Infragistics. Win.UltraWinGrid .InitializeRowEv entArgs) Handles
> gRevisions.Initiali zeRow '// you will need to create an event
handler for
> each grid you specified above
> '// ** Place Event Handling Code Here **
> If Args.Row.Band. Index = 0 Then
>
> If Args.Row.Cells( "RevShortDesc" ).Value = "Obsolete" Then
> Args.Row.Hidden = True
> End If
> End If
> End Sub
>
> End Module

____________ _________ _________ __
From: Kunal Ganguly <kunal_vantage@ yahoo.com>
To: Vantage Yahoo Group <vantage@yahoogroups .com>
Sent: Fri, April 9, 2010 9:54:33 AM
Subject: [Vantage] EpiUltraGrid


Is there a way to set a filter on a EpiUltraGrid?

Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.

Thanks,
Kunal

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
Would it be pretty much the same to hide a column? I have some code right now that uses an adapter to provide a datasource to an ultragrid. It gets populated by button click but I am unable to modify any column properties for the grid. Alternatively I was looking for code to hide columns.

Would it pretty much be on the same type of event described below and instead I would say...

Args.column("column_name").Hidden = true

?

Thanks,

Drew

--- In vantage@yahoogroups.com, Steven Gotschall <sgotschall@...> wrote:
>
> Here is some code I got a while back that hides Parts in an UltraGrid when the RevShortDesc is "Obsolete". Hope it helps.
>
> > '//**************************************************
> > '// Custom VB.NET code for PartForm
> > '// Created: 7/22/2008 6:29:37 PM
> > '//**************************************************
> > 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 **
> > Private WithEvents gRevisions As EpiUltraGrid
> >
> > 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 PartForm_Load(ByVal sender As object, ByVal args As
> EventArgs)
> > Handles PartForm.Load
> > '//
> > '// Add Event Handler Code
> > '//
> > gRevisions =
> > CType(csm.GetNativeControlReference("86fb7bf3-f52e-4d9a-9d96-
> 30551ee51ecf"),
> > EpiUltraGrid)
> >
> > End Sub
> >
> > Private Sub gRevisions_InitializeRow(ByVal Sender As Object, ByVal
> Args As
> > Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles
> > gRevisions.InitializeRow '// you will need to create an event
> handler for
> > each grid you specified above
> > '// ** Place Event Handling Code Here **
> > If Args.Row.Band.Index = 0 Then
> >
> > If Args.Row.Cells("RevShortDesc").Value = "Obsolete" Then
> > Args.Row.Hidden = True
> > End If
> > End If
> > End Sub
> >
> > End Module
>
>
>
> ________________________________
> From: Kunal Ganguly <kunal_vantage@...>
> To: Vantage Yahoo Group <vantage@yahoogroups.com>
> Sent: Fri, April 9, 2010 9:54:33 AM
> Subject: [Vantage] EpiUltraGrid
>
> ÂÂ
> Is there a way to set a filter on a EpiUltraGrid?
>
> Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.
>
> Thanks,
> Kunal
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I figured it out...

OnhandGrid.DisplayLayout.Bands(0).Columns("Company").Hidden = True

For example.

--- In vantage@yahoogroups.com, "drew.pete" <drew.pete@...> wrote:
>
> Would it be pretty much the same to hide a column? I have some code right now that uses an adapter to provide a datasource to an ultragrid. It gets populated by button click but I am unable to modify any column properties for the grid. Alternatively I was looking for code to hide columns.
>
> Would it pretty much be on the same type of event described below and instead I would say...
>
> Args.column("column_name").Hidden = true
>
> ?
>
> Thanks,
>
> Drew
>
> --- In vantage@yahoogroups.com, Steven Gotschall <sgotschall@> wrote:
> >
> > Here is some code I got a while back that hides Parts in an UltraGrid when the RevShortDesc is "Obsolete". Hope it helps.
> >
> > > '//**************************************************
> > > '// Custom VB.NET code for PartForm
> > > '// Created: 7/22/2008 6:29:37 PM
> > > '//**************************************************
> > > 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 **
> > > Private WithEvents gRevisions As EpiUltraGrid
> > >
> > > 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 PartForm_Load(ByVal sender As object, ByVal args As
> > EventArgs)
> > > Handles PartForm.Load
> > > '//
> > > '// Add Event Handler Code
> > > '//
> > > gRevisions =
> > > CType(csm.GetNativeControlReference("86fb7bf3-f52e-4d9a-9d96-
> > 30551ee51ecf"),
> > > EpiUltraGrid)
> > >
> > > End Sub
> > >
> > > Private Sub gRevisions_InitializeRow(ByVal Sender As Object, ByVal
> > Args As
> > > Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles
> > > gRevisions.InitializeRow '// you will need to create an event
> > handler for
> > > each grid you specified above
> > > '// ** Place Event Handling Code Here **
> > > If Args.Row.Band.Index = 0 Then
> > >
> > > If Args.Row.Cells("RevShortDesc").Value = "Obsolete" Then
> > > Args.Row.Hidden = True
> > > End If
> > > End If
> > > End Sub
> > >
> > > End Module
> >
> >
> >
> > ________________________________
> > From: Kunal Ganguly <kunal_vantage@>
> > To: Vantage Yahoo Group <vantage@yahoogroups.com>
> > Sent: Fri, April 9, 2010 9:54:33 AM
> > Subject: [Vantage] EpiUltraGrid
> >
> > ÂÂ
> > Is there a way to set a filter on a EpiUltraGrid?
> >
> > Specifically, I am looking for a way to filter the contents of QuoteView in PartAdvisor based on a value I set in ShortChar08.
> >
> > Thanks,
> > Kunal
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>