Adding new column in grid view

1.6k Views Asked by At

In Epicor how to add a new column " color" in sales order line list grid view. How to customize my form to display color attribute of Line items on grid view

1

There are 1 best solutions below

0
JosephMoeller On

If you intend to store this field in the database, the data model can assist in automatically adding for you. I recommend doing the following in a test system:

  1. Log into Epicor
  2. Launch Extended UD Table Maintenance
  3. Add OrderDtl as a UD extension if one does not exist in your system
  4. Add a new field called Color_c with your appropriate datatype.
  5. In your version of Epicor, you need to trigger a sync to the database using the actions menu. In subsequent versions starting in 10.1, this is no longer required.
  6. Remote into your application server
  7. Open Epicor administration console
  8. Expand "Database Server Management" -> "YourServerName", then right click on "YourDatabaseName" and click Regenerate DataModel.
  9. On the subsequent popup, click Generate. Pay no attention to the in-progress bar; you should not rely on the visual queue to wait to click generate or for the generation to complete.
  10. Once complete, in the Epicor administration console, stop any application pools that are mapped to this database, then start them. You may need to restart your task agent(s) if you have running processes that interact with the Sales Order business object.
  11. When you launch your Order Entry form, the new field should now be the far right column in the collection.

If you just want a field within the grid that you interact with at runtime, rather than touching the EpiUltraGrid control band, you should add the field to the EpiDataView that is bound to the EpiUltraGrid within your initialize block.

EpiDataView edv = (EpiDataView)oTrans.EpiDataViews["YourEpiDataView"];
if(!edv.dataView.Table.Columns.Contains("Color"))
{
    edv.dataView.Table.Columns.Add(new DataColumn("Color", typeof(string)));
}