BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
table.Rows.Add(row3);
table.Rows.Add(row4);
both the GridDataBoundGrid and DataGrid behave the same way (showing empty cells). Thus, I think the only reason the DataGrid can find the values with the code not commented is that the rows are a member of its table datasource.
Are you trying to do self-references to the same table? If so, I am not sure you will be able to get this to work.
The GridDataBoundGrid will try to display the public properties of the onject in the arraylist. Those properties are CUstomersDataRowView.Row and CustomersDataRowView.Pos. These are the 2 things the grid is trying to display when you see the 2 empty cells. You can actually get the grid to display them by having your ArrayList implement ITypedList.
public class MyArrayList : ArrayList, ITypedList { public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors) { return TypeDescriptor.GetProperties(typeof(CustomDataRowView)); } public string GetListName(PropertyDescriptor[] listAccessors) { return "CustomDataRowView"; } }This will show you the values in the GridDataBoundGrid. So, one try at getting this to work is to create a custom property descriptor that retrieves the FirstName and Last given the Row object, and then use this custom descriptor in your ITyleList implementation.