Awesome! No errors, but still not working... This is what I have in sum now
// **************************************************
// Custom code for MainController
// Created: 4/16/2012 11:02:07 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Epicor.Mfg.BO;
using Epicor.Mfg.UI;
using Epicor.Mfg.UI.Adapters;
using Epicor.Mfg.UI.Customization;
using Epicor.Mfg.UI.ExtendedProps;
using Epicor.Mfg.UI.FormFunctions;
using Epicor.Mfg.UI.FrameWork;
using Epicor.Mfg.UI.Searches;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
public class Script
{
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
EpiUltraGrid myGrid;
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
myGrid = (EpiUltraGrid)csm.GetNativeControlReference("c0fc860e-d29b-4930-a378-fc275c2a9f64");
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
this.myGrid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
// End Wizard Added Custom Method Calls
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
this.myGrid.InitializeLayout -= new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
}
private void myGrid_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
EpiMessageBox.Show("Test");
e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
e.Layout.Override.RowSizing = RowSizing.AutoFree;
e.Layout.Override.CellMultiLine = DefaultableBoolean.True;
}
}
The message box was added lastly just to see if i could verify the sub triggers, it doesn't...
// **************************************************
// Custom code for MainController
// Created: 4/16/2012 11:02:07 AM
// **************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Epicor.Mfg.BO;
using Epicor.Mfg.UI;
using Epicor.Mfg.UI.Adapters;
using Epicor.Mfg.UI.Customization;
using Epicor.Mfg.UI.ExtendedProps;
using Epicor.Mfg.UI.FormFunctions;
using Epicor.Mfg.UI.FrameWork;
using Epicor.Mfg.UI.Searches;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
public class Script
{
// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
// Begin Wizard Added Module Level Variables **
EpiUltraGrid myGrid;
// End Wizard Added Module Level Variables **
// Add Custom Module Level Variables Here **
public void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
// Begin Wizard Added Variable Initialization
myGrid = (EpiUltraGrid)csm.GetNativeControlReference("c0fc860e-d29b-4930-a378-fc275c2a9f64");
// End Wizard Added Variable Initialization
// Begin Wizard Added Custom Method Calls
this.myGrid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
// End Wizard Added Custom Method Calls
}
public void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
// Begin Wizard Added Object Disposal
this.myGrid.InitializeLayout -= new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
// End Wizard Added Object Disposal
// Begin Custom Code Disposal
// End Custom Code Disposal
}
private void myGrid_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
EpiMessageBox.Show("Test");
e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
e.Layout.Override.RowSizing = RowSizing.AutoFree;
e.Layout.Override.CellMultiLine = DefaultableBoolean.True;
}
}
The message box was added lastly just to see if i could verify the sub triggers, it doesn't...
--- In vantage@yahoogroups.com, "jckinneman" <jckinneman@...> wrote:
>
>
>
> //Declare MyGrid in the global/module level area just before the initializeCustomCode()
>
> // Add Custom Module level Variables here **
> EpiUltrGrid MyGrid;
>
> Then inside of initializeCustomCode() put
>
> // End Wizard Added custom method calls
> MyGrid = (EpiUltraGrid)csm.GetNativeControlReference("GUID-STRING");
> // Then add your event handlers next.
> this.MyGrid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.MyGrid_InitializeLayout);
>
> Jim Kinneman
> Encompass Solutions, Inc
>
> --- In vantage@yahoogroups.com, "Anon" <jgiese@> wrote:
> >
> > Sorry about that previous reply mess apparently the rich text editor does not work?
> >
> > So this code will report no errors but does not work
> >
> > using Infragistics.Win;
> > using Infragistics.Win.UltraWinGrid;
> >
> > private void myGrid_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) {
> > e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
> > e.Layout.Override.RowSizing = RowSizing.AutoFree;
> > e.Layout.Override.CellMultiLine = DefaultableBoolean.True;
> > }
> >
> > I am trying to attach this code to a native grid so I've manually added
> > the init and destroy references because i cannot create them using the
> > wizard
> >
> > this.myGrid.InitializeLayout += new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
> > this.myGrid.InitializeLayout -= new Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_InitializeLayout);
> >
> > however adding those references now causes these two errors. Any ways
> > for me to make them recognize this reference?
> >
> > Error: CS0117 - line 39 (113) - 'Script' does not contain a definition for 'myGrid'
> > Error: CS0117 - line 48 (122) - 'Script' does not contain a definition for 'myGrid'
> >
> > I tried adding this code to the top of the script file
> >
> > // Begin Wizard Added Module Level Variables **EpiUltraGrid myGrid = (EpiUltraGrid)csm.GetNativeControlReference("c0fc860e-d29b-4930-a378-fc275c2a9f64");
> >
> > but then it throws this error
> >
> > Error: CS0236 - line 25 (99) - A field initializer cannot reference the nonstatic field, method, or property 'Script.csm'
> >
> > Hoping someone might know how I can do this to a native control.
> >
> > --- In vantage@yahoogroups.com, "Anon" <jgiese@> wrote:
> > >
> > > So this code will report no errors but does not work
> > > using Infragistics.Win;using Infragistics.Win.UltraWinGrid;
> > > private void myGrid_InitializeLayout(object sender,
> > > Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) {
> > > e.Layout.AutoFitStyle = AutoFitStyle.ResizeAllColumns;
> > > e.Layout.Override.RowSizing = RowSizing.AutoFree;
> > > e.Layout.Override.CellMultiLine = DefaultableBoolean.True; }
> > > I am trying to attach this code to a native grid so I've manually added
> > > the init and destroy references because i cannot create them using the
> > > wizard
> > > this.myGrid.InitializeLayout += new
> > > Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_I\
> > > nitializeLayout);
> > > this.myGrid.InitializeLayout -= new
> > > Infragistics.Win.UltraWinGrid.InitializeLayoutEventHandler(this.myGrid_I\
> > > nitializeLayout);
> > > however adding those references now causes these two errors. Any ways
> > > for me to make them recognize this reference?
> > > Error: CS0117 - line 39 (113) - 'Script' does not contain a definition
> > > for 'myGrid' Error: CS0117 - line 48 (122) - 'Script' does not contain a
> > > definition for 'myGrid'
> > > I tried adding this code to the top of the script file
> > > // Begin Wizard Added Module Level Variables **EpiUltraGrid myGrid =
> > > (EpiUltraGrid)csm.GetNativeControlReference("c0fc860e-d29b-4930-a378-fc2\
> > > 75c2a9f64");
> > > but then it throws this error
> > > Error: CS0236 - line 25 (99) - A field initializer cannot reference the
> > > nonstatic field, method, or property 'Script.csm'
> > > Hoping someone might know how I can do this to a native control.
> > > --- In vantage@yahoogroups.com, "jckinneman" <jckinneman@> wrote:
> > > >
> > > > Just made a quick look so this may not be complete but it looks like
> > > this may need to go into the InitializeLayout event for the Grid.
> > > >
> > > > The link I looked at is
> > > >
> > > http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?Arti\
> > > cleID=1704 "Howto:UltraWinGrid Row Appearance" B01704
> > > >
> > > > Jim Kinneman
> > > > Encompass Solutions, Inc
> > > >
> > > > --- In vantage@yahoogroups.com, "Anon" jgiese@ wrote:
> > > > >
> > > > > That is originally what I had in the code. I added the += hoping it
> > > would make the error message go away.
> > > > >
> > > > > --- In vantage@yahoogroups.com, "jckinneman" <jckinneman@> wrote:
> > > > > >
> > > > > > += is an adding operator, I think you just need an assignment.
> > > > > >
> > > > > > myGrid.Layout.Override.RowSizing =
> > > Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
> > > > > >
> > > > > > Jim Kinneman
> > > > > > Encompass Solutions, Inc
> > > > > >
> > > > > > --- In vantage@yahoogroups.com, "Anon" <jgiese@> wrote:
> > > > > > >
> > > > > > > Ok so i've found information on it and you can for sure do it.
> > > Now I am trying to figure out how to do it in the context of epicor. On
> > > the load method this is what I have so far
> > > > > > >
> > > > > > > private void MainController_Load(object sender, EventArgs args)
> > > > > > > {
> > > > > > > // Add Event Handler Code
> > > > > > > EpiUltraGrid myGrid =
> > > (EpiUltraGrid)csm.GetNativeControlReference("e9b7d533-09e2-4e48-995b-1a0\
> > > 686c9b810");
> > > > > > > myGrid.Layout.Override.RowSizing+=
> > > Infragistics.Win.UltraWinGrid.RowSizing.AutoFree;
> > > > > > > }
> > > > > > >
> > > > > > > It throws one error which I don't know C# very well so I'm not
> > > certain what it means.
> > > > > > >
> > > > > > > The event 'System.Windows.Forms.Control.Layout' can only appear
> > > on the left hand side of += or -=
> > > > > > >
> > > > > > > --- In vantage@yahoogroups.com, "jckinneman" <jckinneman@>
> > > wrote:
> > > > > > > >
> > > > > > > > The Epicor controls are for the most part infragistics based
> > > controls so many times you can figure out what is and is not possible by
> > > searching their website. You can search on Ultragrid infragistics word
> > > wrap to find some discussion on it.
> > > > > > > >
> > > > > > > > Jim Kinneman
> > > > > > > > Encompass Solutions, Inc
> > > > > > > >
> > > > > > > > --- In vantage@yahoogroups.com, "Anon" <jgiese@> wrote:
> > > > > > > > >
> > > > > > > > > Is it possible? You can expand the height of the rows, but
> > > to what purpose if it does not word wrap?
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>