Adding a Field to A Grid

Yes Jose this makes sense. I just looked in Epicor 904 under the EpiControl GLJrnDtl, they had the VendorName, VendorNum, VendorID and etc on the grdList dataview.

 

Epicor took it out in 905 and I don't know why they did that.

 

I guess I will have to write specila code to get the VendorID to show, Funny enough, the vendor information is in the EpiControl PartTran dataset.

Can someone give me some guidance on how to add a field to a grid.  any assistance would be appreciated thanks.

Options/personalization will do it.  Click on grid, click on collections and unhide field you want to display.  Personalization will only do it for the current user.


You can also go into developer mode, click on the grid, go to the properties tab, click collections and uncheck the hide check-box on the field you want to display.  save customization, change menu to use customization.


Jim Kinneman

Encompass Solutions, Inc.

Me and several others have answered this question on here before. Search through the list :)

On Jan 3, 2014 11:52 AM, <devind@...> wrote:

Â
<div>
  
  
  <p><p>Can someone give me some guidance on how to add a field to a grid.  any assistance would be appreciated thanks.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Hello Jose, I tried adding VendorNumVendorID from the PartsTrans Dataset to the Chart Tracker.

 

I have used your code examples off of youtube but I cannot get that Column to populate data eventhoug the code complied with no errors.

 

Do you have any ideas?

Show me your code and I'll try to hel.p you out


Jose C Gomez

Software Engineer


T: 904.469.1524 mobile
E: jose@…

http://www.josecgomez.com
     Â


Quis custodiet ipsos custodes?


On Fri, Jan 3, 2014 at 5:39 PM, <cyrilz199@...> wrote:

Â
<div>
  
  
  <p></p><p>Hello Jose, I tried adding VendorNumVendorID from the PartsTrans Dataset to the Chart Tracker.</p><p>Â </p><p>I have used your code examples off of youtube but I cannot get that Column to populate data eventhoug the code complied with no errors.</p>

Â

Do you have any ideas?

</div>
 


<div style="color:#fff;min-height:0;"></div>

// **************************************************
// Custom code for ChartTrackerForm
// Created: 1/3/2014 10:16:20 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 Epicor.Mfg.Core;
using Epicor.Mfg.Lib;


public class 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 **
    Epicor.Mfg.UI.FrameWork.EpiUltraGrid myGrid;
    BOReader _boReader;

 public void InitializeCustomCode()
 {
  // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
  // Begin Wizard Added Variable Initialization

  // End Wizard Added Variable Initialization

  // Begin Wizard Added Custom Method Calls

  // End Wizard Added Custom Method Calls
          myGrid = (Epicor.Mfg.UI.FrameWork.EpiUltraGrid)csm.GetNativeControlReference("71f64ea7-7091-4d95-af97-914e4bac8a5d");
          myGrid.DisplayLayout.Bands[0].Columns.Add("VendorNumVendorID","Supplier ID");
          myGrid.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(grdMatLst_InitializeRow);
          _boReader = new BOReader(((Session)oTrans.Session).ConnectionPool);
 }

    private void grdMatLst_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e)
    {
      if(!String.IsNullOrEmpty(e.Row.Cells["VendorNumVendorID"].Value.ToString()))
        {
            DataSet ds = _boReader.GetRows("PartTran","VendorNumVendorID='"+e.Row.Cells["VendorNumVendorID"].Value.ToString()+ "'","VendorNumVendorID");
             if(ds.Tables[0].Rows.Count > 0 )
               e.Row.Cells["VendorNumVendorID"].Value = ds.Tables[0].Rows[0]["VendorNumVendorID"];
        }
    }

 public void 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
         myGrid.InitializeRow += new Infragistics.Win.UltraWinGrid.InitializeRowEventHandler(grdMatLst_InitializeRow);
         _boReader = null;
 }
}

Tracing my code in VS 2010, on the line of code below, I get object reference not set to an instance of an Object.

 

if(!String.IsNullOrEmpty(e.Row.Cells["VendorNumVendorID"].Value.ToString()))

I don't believe String.IsNullOrEmpty was available until after .Net 3.5.  It won't work in Epicor.

String.IsNullOrEmpty was added in .net 2 http://msdn.microsoft.com/en-us/library/system.string.isnullorempty(v=vs.80).aspx

In your code you are running a lookup to get the same field you are passing on the where clause that doesn't make sense

But besides that are you sure that vendor vendor num is available in your data set?

Â
<div>
  
  
  <p><p>I don&#39;t believe String.IsNullOrEmpty was available until after .Net 3.5. Â It won&#39;t work in Epicor.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Where am I  doing wrong "In your code you are running a lookup to get the same field you are passing on the where clause that doesn't make sense" ?

 

From the data objects, under the EpiDataView, the PartTran dataView has the VendorNumVendorID Column in it.

Right but you are trying to add it to a grid which doesn't have that column. Where is this customization being made?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Sun, Jan 5, 2014 at 1:48 PM, <cyrilz199@...> wrote:

Â
<div>
  
  
  <p></p><p>Where am I  doing wrong &quot;In your code you are running a <var></var>lookup to get the same field you are passing on the where clause that doesn&#39;t make sense&quot; ?</p><p> </p><p>From the data objects, under the EpiDataView, the PartTran dataView has the VendorNumVendorID Column in it.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

The customization is being made at the Chart Tracker. After I add a GL Account, then I click on the tab Transaction Detail - Specific - Detail.

 

The EpiBinding for the grid is GLJrnDtl.

ok in your code you are passing the vendornumvendID field does that field exist in GLJrlDtl?



Jose C Gomez
Software Engineer



T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Sun, Jan 5, 2014 at 5:23 PM, <cyrilz199@...> wrote:

Â
<div>
  
  
  <p></p><p>The customization is being made at the Chart Tracker. After I add a GL Account, then I click on the tab Tran<var></var>saction Detail - Specific - Detail.</p><p> </p><p>The EpiBinding for the grid is GLJrnDtl.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

Nope but it does exist from the parttran.

Sent from my iPhone

On Jan 5, 2014, at 2:56 PM, "Jose Gomez" <jose@...> wrote:

 

ok in your code you are passing the vendornumvendID field does that field exist in GLJrlDtl?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Sun, Jan 5, 2014 at 5:23 PM, <cyrilz199@...> wrote:
 

The customization is being made at the Chart Tracker. After I add a GL Account, then I click on the tab Transaction Detail - Specific - Detail.

 

The EpiBinding for the grid is GLJrnDtl.



______________________________________________________________________
This e-mail has been scanned by Verizon Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on Verizon's Managed Email Content Service, visit http://www.verizonbusiness.com.
______________________________________________________________________

______________________________________________________________________
This e-mail has been scanned by Verizon Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on Verizon's Managed Email Content Service, visit http://www.verizonbusiness.com.
______________________________________________________________________
You are running a query to find that informatin you need to get whatever information you currently have and use it in the whereclause to get the value you are looking for
for example if you have partnum
you need to use that to get the vendorvendornum does that make sensE


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile
E: jose@...
http://www.josecgomez.com

     Â


Quis custodiet ipsos custodes?


On Sun, Jan 5, 2014 at 6:07 PM, Balonwu, Cyril O. <COBalonwu@...> wrote:

Â
<div>
  
  
  <p>

Nope but it does exist from the parttran.

Sent from my iPhone

On Jan 5, 2014, at 2:56 PM, "Jose Gomez" <jose@...> wrote:

Â

ok in your code you are passing the vendornumvendID field does that field exist in GLJrlDtl?


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?


On Sun, Jan 5, 2014 at 5:23 PM, <cyrilz199@...> wrote:
Â

The customization is being made at the Chart Tracker. After I add a GL Account, then I click on the tab Transaction Detail - Specific - Detail.

Â

The EpiBinding for the grid is GLJrnDtl.



______________________________________________________________________
This e-mail has been scanned by Verizon Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on Verizon's Managed Email Content Service, visit http://www.verizonbusiness.com.
______________________________________________________________________

______________________________________________________________________
This e-mail has been scanned by Verizon Managed Email Content Service, using Skeptic(tm) technology powered by MessageLabs. For more information on Verizon's Managed Email Content Service, visit http://www.verizonbusiness.com.

______________________________________________________________________

</div>
 


<div style="color:#fff;min-height:0;"></div>