I’m attempting to set the column names and widths on a Base epiUltraGrid in a UD100 Customization. I copied and modified the Code from an existing UD04 Customization in which the column changes work :
EpiUltraGrid gridPartRevs = ( ( EpiUltraGrid )csm.GetNativeControlReference( "b268a966-22c3-4505-ab20-f87df5d80706" ) );
UltraGridBand bandPartRevs = gridPartRevs.DisplayLayout.Bands[0];
bandPartRevs.ColHeaderLines = 3;
gridPartRevs.DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;
gridPartRevs.DisplayLayout.Bands[ 0 ].Columns[ 0 ].Header.Caption = "Part Class";
bandPartRevs.Columns[ 0 ].Width = 50; // Part Class
This is the Code in the UD100 Customization in which the column names and widths are not affected :
EpiUltraGrid eugChildListGrid = ( ( EpiUltraGrid )csm.GetNativeControlReference( "87f88dc8-1b94-4324-ba83-583a2af5cbb9" ) );
// eugChildListGrid.Visible = false;
// Added above line as a test to confirm that the GUID was correct
// When that line is not commented out, the Grid is not visible
UltraGridBand bndChildListGrid = eugChildListGrid.DisplayLayout.Bands[ 0 ];
bndChildListGrid.ColHeaderLines = 3;
eugChildListGrid.DisplayLayout.Override.WrapHeaderText = Infragistics.Win.DefaultableBoolean.True;
eugChildListGrid.DisplayLayout.Bands[ 0 ].Columns[ 0 ].Header.Caption = "Row Type";
bndChildListGrid.Columns[ 0 ].Width = 50; // Row Type
In both Customizations, the Code is in the same location - the last lines at the end of the UD04Form_Load or UD100Form_Load.
The using statements have also been corrected, adding the lines from the Customization that works to the one that doesn’t :
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.Adapters;
using Ice.BO;
using Ice.Lib;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI;
using Ice.UI.FormFunctions;
// added using statements :
using Ice.UI.FormFunctions;
using System.Collections.Generic;
using Erp.Adapters;
using Infragistics.Win.UltraWinGrid;
using Infragistics.Win.UltraWinDock;
I’ve also added the Assembly References ( Epicor.ServiceModel, Ice.Contracts.BO.DynamicQuery, Ice.Core.Session ) to the UD100 Customization to match the UD04 Customization.
I expect I’m missing something obvious, but can’t spot it. Any sharp eyes out there seeing what I’m not ?
Thanks,
Ken Brunelli