New epi ultragrid row

Hi There I’m new on this forum I’m learnig about epicor forms

so… I have been playing around 2 utragrids basically I’m passing rows from one to another

the second has binding , after several tries od add de row I just could adding to the datasource with this Code:

 if(this.addedParts.Rows.Count == 0){
    DataSet  dataSet1 = new DataSet("dataSet1");
DataTable table = new DataTable("Table");

//Create three columns that will hold sample data.
DataColumn column1 = new DataColumn(“Part Number”, typeof(string));
DataColumn column2 = new DataColumn(“Customer Part Number”, typeof(string));
DataColumn column3 = new DataColumn(“Item Description”, typeof(string));
DataColumn column4 = new DataColumn(“Location”, typeof(string));
DataColumn column5 = new DataColumn(“Buyer/Planner”, typeof(string));
DataColumn column6 = new DataColumn(“Old Price”, typeof(decimal));
DataColumn column7 = new DataColumn(“New Price”, typeof(decimal));
//Add the columns to the table.
table.Columns.AddRange(new DataColumn[] { column1, column2, column3,column4, column5, column6,column7 });
//Add the table to the dataset.
dataSet1.Tables.Add(table);
this.addedParts.DataSource = dataSet1;
}

UltraGridRow row = this.addedParts.DisplayLayout.Bands[0].AddNew();											        
                                   
row.Cells[0].Value = rowSelected.Cells[0].Value;
row.Cells[1].Value = rowSelected.Cells[2].Value;;
row.Cells[2].Value = rowSelected.Cells[3].Value;
row.Cells[3].Value = "10";    
row.Cells[4].Value = "Test Buyer";    
row.Cells[5].Value = rowSelected.Cells[8].Value;   
row.Cells[6].Value = 16.2;   

the code works … but how can I tell the grid the Field names not just the caption for the columns for new rows , I mean the fields name that belongs to the main binding

You can specify the DataColumn.ColumnName which can then be used to specify the column in the row instead of the int index.

Hi Jhonathann thank you that worked fine…

I have another question if you could help me I just added some rows to the Grid

it’s posible to save all rows as Childs ??

when I hit save nothing happnes (no errors or popus)

Gird binding is : [Ice].[UD100A]

hopefully you can help me whit this

regards from MX

Unfortunately I’m not that savvy about customizations, so I don’t really know.

However I can tell you that epicor’s UI usually works one row at a time, if the values are not saved then most likely the rows are not inserted correctly or with the correct status(Added, Modified) in the client’s DataSet which should then be sent to the server for processing/saving.