Skip to content

Instantly share code, notes, and snippets.

@strepicor
strepicor / Customization.epicor
Created August 29, 2017 02:23
UltraGrid Column Header Name, Width & Position
private void grdName_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs args)
{
foreach (Infragistics.Win.UltraWinGrid.UltraGridColumn col in grdName.DisplayLayout.Bands[0].Columns)
{
if(col.Key == "DB_Col_Name_1")
{
col.Header.Caption = "Column Name 1";
col.Width = 100;
col.Header.VisiblePosition = 1;
}
@strepicor
strepicor / Customization.epicor
Last active July 21, 2022 22:21
EpiUltraGrid Cell Edit Mode
// Exit, Enter Cell Edit mode when user navigates grid column cells with Up, Down Keys in UltraGrid
private void grdName_KeyDown(object sender, System.Windows.Forms.KeyEventArgs args)
{
if ((args.KeyCode == Keys.Down))
{
grdAttributes.PerformAction(UltraGridAction.ExitEditMode);
grdAttributes.PerformAction(UltraGridAction.BelowCell);
args.Handled = true;
@strepicor
strepicor / Customization.epicor
Last active July 17, 2017 07:29
Filter Search Window Result Columns
private void oTrans_adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
switch (args.MethodName)
{
case "GetRows": //"GetList"
System.Collections.ArrayList myCols;
EpiSearchColumn col0;
EpiSearchColumn col1;
// Paramters: Data Column Name, Column Header Text, Width, Is Result, Position
@strepicor
strepicor / Customization.epicor
Last active April 2, 2024 02:22
Company, PlantId, UserId
// Add a reference to Ice.Core.Session dll
private string company;
private string plantId;
private string userId;
public void InitializeCustomCode()
{
...
@strepicor
strepicor / Customization.epicor
Last active July 27, 2017 03:45
Grid column Dropdown / Disable
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
private void grdGridName_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs args)
{
grdGridName.DisplayLayout.Bands[0].Columns["ColumnName"].EditorControl = cmbCustomerLanguage;
grdGridName.DisplayLayout.Bands[0].Columns["ColumnName"].CellActivation = Activation.NoEdit;
}
@strepicor
strepicor / Customization.epicor
Last active May 2, 2019 08:31
Change default search forms grid column names
private void oTrans_adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
switch (args.MethodName)
{
case "GetRows":
{
System.Collections.ArrayList myCols;
EpiSearchColumn col1;
// Paramters: Data Column Name, Column Header Text, Width, Is Result, Position
col1 = new EpiSearchColumn("Key1", "a", -1, true, 0);
@strepicor
strepicor / Customization.epicor
Created December 16, 2016 05:41
Epicor Customization - Create EpiDataView Refernce
EpiDataView edvViewName = ((EpiDataView)(this.oTrans.EpiDataViews["ViewName"]));
@strepicor
strepicor / Customization.epicor
Created December 9, 2016 09:07
Epicor Customization - Hide Default Treeview Panel
using System.Reflection;
public class Script
{
Infragistics.Win.UltraWinDock.UltraDockManager dock;
public void InitializeCustomCode()
{
@strepicor
strepicor / Customization.epicor
Last active April 2, 2024 02:23
Epicor Customization - Update fields using an adaptor
JobEntryAdapter adapterJobEntry = new JobEntryAdapter(this.oTrans);
adapterJobEntry.BOConnect();
DataSet dsJobDetails = adapterJobEntry.GetData(jobNum);
DataRow dr = adapterJobEntry.JobEntryData.JobHead.Rows[0];
dr.BeginEdit();
dr["FieldName_c"] = newValue;
@strepicor
strepicor / Customization.epicor
Last active April 2, 2024 02:19
Epicor Customization - Retrieve Data from a BAQ
// Add a reference to "Ice.Contracts.Bo.DynamicQuery"
public struct BaqParam
{
public BaqParam(string paramName, string paramType, string paramValue)
{
this.ParamName = paramName;
this.ParamType = paramType;
this.ParamValue = paramValue;