The winning code! Thanks for your help on this, Jose.
private static void grdPackOutList_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs args)
{
Epicor.Mfg.Core.Session epiSession = (Epicor.Mfg.Core.Session)CustShipForm.Session;
BOReader _boReader = new BOReader(epiSession.ConnectionPool);
DataSet ds = _boReader.GetRows("Part", "Part.PartNum='" + args.Row.Cells["PartNum"].Value.ToString() + "'", "CheckBox06");
if (ds.Tables[0].Rows.Count > 0)
{
args.Row.Cells["CheckBox06"].Value = ds.Tables[0].Rows[0]["CheckBox06"].ToString();
}
}
private static void grdPackOutList_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs args)
{
Epicor.Mfg.Core.Session epiSession = (Epicor.Mfg.Core.Session)CustShipForm.Session;
BOReader _boReader = new BOReader(epiSession.ConnectionPool);
DataSet ds = _boReader.GetRows("Part", "Part.PartNum='" + args.Row.Cells["PartNum"].Value.ToString() + "'", "CheckBox06");
if (ds.Tables[0].Rows.Count > 0)
{
args.Row.Cells["CheckBox06"].Value = ds.Tables[0].Rows[0]["CheckBox06"].ToString();
}
}
--- In vantage@yahoogroups.com, Jose Gomez <jose@...> wrote:
>
> your episession should come from oTrans
>
> oTrans.Session you'll need to cast that to Epicor.Mfg.Core.Session.
>
> *Jose C Gomez*
> *Software Engineer*
> *
> *
> *checkout my new blog <http://www.usdoingstuff.com> *
> *
> *T: 904.469.1524 mobile
> E: jose@...
> http://www.josecgomez.com
> <http://www.linkedin.com/in/josecgomez> <http://www.facebook.com/josegomez>
> <http://www.google.com/profiles/jose.gomez> <http://www.twitter.com/joc85>
> <http://www.josecgomez.com/professional-resume/>
> <http://www.josecgomez.com/feed/>
> <http://www.usdoingstuff.com>
>
> *Quis custodiet ipsos custodes?*
>
>
>
> On Wed, Feb 29, 2012 at 5:23 PM, altyrocks <alty_rocks@...> wrote:
>
> > **
> >
> >
> > OK, I think I'm getting close. I have the BOReader defined but now I'm
> > getting an error with the epiSession.
> > BOReader _boReader = new BOReader(epiSession.ConnectionPool);
> > How should I define that?
> >
> >
> > --- In vantage@yahoogroups.com, Jose Gomez <jose@> wrote:
> > >
> > > It does only work for custom controls, draw a custom grid have it
> > generate
> > > then re-write it slightly for your control you are going to need to
> > use
> > > csm.GetNativeControlReference(GUID) to get the instance of the
> > control.
> > >
> > > _boReader is a library which allows you to query any Business Object.
> > >
> > > *Jose C Gomez*
> > > *Software Engineer*
> > > *
> > > *
> > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > *
> > > *T: 904.469.1524 mobile
> > > E: jose@
> > > http://www.josecgomez.com
> > > <http://www.linkedin.com/in/josecgomez>
> > <http://www.facebook.com/josegomez>
> > > <http://www.google.com/profiles/jose.gomez>
> > <http://www.twitter.com/joc85>
> > > <http://www.josecgomez.com/professional-resume/>
> > > <http://www.josecgomez.com/feed/>
> > > <http://www.usdoingstuff.com>
> > >
> > > *Quis custodiet ipsos custodes?*
> > >
> > >
> > >
> > > On Wed, Feb 29, 2012 at 12:43 PM, altyrocks alty_rocks@ wrote:
> > >
> > > > **
> > > >
> > > >
> > > > Ha ha, I love the automagically factor. Are you talking about the
> > Event
> > > > Wizard tab? It looks like that only works for custom controls and
> > not my
> > > > standard grid. Also, what is the _boreader? Thanks!
> > > >
> > > > --- In vantage@yahoogroups.com, Jose Gomez jose@ wrote:
> > > > >
> > > > > Its a magical where clause LoL, you can ignore that line, in the
> > Event
> > > > > Selection screen you can pick your Grid and initialize to have it
> > > > generate
> > > > > the event for you.
> > > > >
> > > > > *Jose C Gomez*
> > > > > *Software Engineer*
> > > > > *
> > > > > *
> > > > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > > > *
> > > > > *T: 904.469.1524 mobile
> > > > > E: jose@
> > > > > http://www.josecgomez.com
> > > > > <http://www.linkedin.com/in/josecgomez>
> > > > <http://www.facebook.com/josegomez>
> > > > > <http://www.google.com/profiles/jose.gomez>
> > > > <http://www.twitter.com/joc85>
> > > > > <http://www.josecgomez.com/professional-resume/>
> > > > > <http://www.josecgomez.com/feed/>
> > > > > <http://www.usdoingstuff.com>
> > > > >
> > > > > *Quis custodiet ipsos custodes?*
> > > > >
> > > > >
> > > > >
> > > > > On Wed, Feb 29, 2012 at 12:08 PM, altyrocks alty_rocks@ wrote:
> > > > >
> > > > > > **
> > > >
> > > > > >
> > > > > >
> > > > > > Thanks for the reply. I'm not fully understanding how to
> > implement
> > > > > > this. Is there a wizard that creates this initialize event in
> > > > Epicor?
> > > > > > If not, I'm assuming I call it in the InitializeCustomCode event
> > but
> > > > I'm
> > > > > > not sure what parameters I need to pass to the method.
> > > > > > Also, you create the whereClause and assign it a string value
> > but I
> > > > > > don't ever see it getting used anywhere.
> > > > > >
> > > > > >
> > > > > > --- In vantage@yahoogroups.com, Jose Gomez jose@ wrote:
> > > > > > >
> > > > > > > You need to populated on the Initialzie Row event of the grid.
> > > > > > >
> > > > > > > private static void grdMatLst_InitializeRow(object sender,
> > > > > > > Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
> > > > > > > {
> > > > > > > String whereClause =
> > > > > > > "Part.PartNum='"+e.Row.Cells["PartNum"].Value.ToString()+"'";
> > > > > > > DataSet ds =
> > > > > >
> > > >
> > _boReader.GetRows("Part","Part.PartNum='"+e.Row.Cells["PartNum"].Value.T\
> > \
> > > > \
> > > > > >
> > > > > > oString()+"'","Mtl-AnalysisCode");
> > > > > > >
> > > > > > > if(ds.Tables[0].Rows.Count>0)
> > > > > > > {
> > > > > > >
> > > > > >
> > > >
> > e.Row.Cells["MatAnal"].Value=ds.Tables[0].Rows[0]["Mtl-AnalysisCode"].To\
> > \
> > > > \
> > > > > > String();
> > > > > > > }
> > > > > > >
> > > > > > > }
> > > > > > >
> > > > > > >
> > > > > > > *Jose C Gomez*
> > > > > > > *Software Engineer*
> > > > > > > *
> > > > > > > *
> > > > > > > *checkout my new blog <http://www.usdoingstuff.com> *
> > > > > > > *
> > > > > > > *T: 904.469.1524 mobile
> > > > > > > E: jose@
> > > > > > > http://www.josecgomez.com
> > > > > > > <http://www.linkedin.com/in/josecgomez>
> > > > > > <http://www.facebook.com/josegomez>
> > > > > > > <http://www.google.com/profiles/jose.gomez>
> > > > > > <http://www.twitter.com/joc85>
> > > > > > > <http://www.josecgomez.com/professional-resume/>
> > > > > > > <http://www.josecgomez.com/feed/>
> > > > > > > <http://www.usdoingstuff.com>
> > > > > > >
> > > > > > > *Quis custodiet ipsos custodes?*
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Feb 28, 2012 at 12:43 PM, altyrocks alty_rocks@ wrote:
> > > > > > >
> > > > > > > > **
> > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Hello. I am trying to display the Part.CheckBox06 value on
> > the
> > > > > > PackOut tab
> > > > > > > > of the Customer Shipment Entry screen. I need it to show up
> > in
> > > > the
> > > > > > Details
> > > > > > > > grid at the bottom of the screen. I have successfully added
> > a
> > > > > > checkbox to
> > > > > > > > the grid using the following code:
> > > > > > > >
> > > > > > > > private static void CustShipForm_Load(object sender,
> > EventArgs
> > > > args)
> > > > > > > > {
> > > > > > > > EpiUltraGrid grdPackOutList =
> > > > > > > >
> > > > > >
> > > >
> > (EpiUltraGrid)csm.GetNativeControlReference("d9062e9e-321b-4f96-8883-c83\
> > \
> > > > \
> > > > > >
> > > > > > c0889e0f8");
> > > > > > > >
> > grdPackOutList.DisplayLayout.Bands[0].Columns.Add("CheckBox06",
> > > > "Do
> > > > > > Not
> > > > > > > > Freeze");
> > > > > > > >
> > > > grdPackOutList.DisplayLayout.Bands[0].Columns["CheckBox06"].DataType
> > > > > > =
> > > > > > > > typeof(bool);
> > > > > > > >
> > > > grdPackOutList.DisplayLayout.Bands[0].Columns["CheckBox06"].Style =
> > > > > > > > Infragistics.Win.UltraWinGrid.ColumnStyle.CheckBox;
> > > > > > > >
> > > > > >
> > > >
> > grdPackOutList.DisplayLayout.Bands[0].Columns["CheckBox06"].CellActivati\
> > \
> > > > \
> > > > > > on
> > > > > >
> > > > > > > > = Activation.Disabled;
> > > > > > > > }
> > > > > > > >
> > > > > > > > but I'm not sure how to populate values in that checkbox.
> > Just
> > > > > > adding the
> > > > > > > > column doesn't sync it to the Part.CheckBox06.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > [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]
> > > > >
> > > >
> > > > [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]
> >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>