all groups > dotnet windows forms databinding > july 2005 >
You're in the

dotnet windows forms databinding

group:

What do I need to implement to use a DataGridTextBoxColumn MappingName?


What do I need to implement to use a DataGridTextBoxColumn MappingName? aualias
7/11/2005 3:56:52 PM
dotnet windows forms databinding:
Hi All,

I have a Public Class PurchaseOrder which contains a POItemCollection
Public Class POItemCollection
Implements IList, IEnumerable

The PO ItemCollection contains an ArrayList of POItem which have the
following properties
InventoryID, Description and Price

I have a DataGrid with the DataSource set to the POItemCollection. When I
create the DataGridTableStyle, I create a DataGridTextBoxColumn which uses
the property names (InventoryID, Description and Price) for the MappingName
for each column.

None of the formatting takes. I get the correct values in the DataGrid, but
with the default formatting.

What do I have to do to my POItemCollection so that I can use it for a
DataSource for a DataGrid? I thought that I could just use the properties
of the object contained in my IList (the POItemCollection).

My guess is that there is a problem because the IList.Item returns an
object, not a POItem. What do I have to implement to use a
DataGridTextBoxColumn MappingName?

Thanks.

David


Re: What do I need to implement to use a DataGridTextBoxColumn MappingName? aualias
7/12/2005 9:12:00 AM
Found the answer...

I set the MappingName to the class name (POItemCollection) and it works
fine.


[quoted text, click to view]

AddThis Social Bookmark Button