Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with Mappingname
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00906761
Message ID:
00907333
Vues:
15
>Well in this case Kevin, the help topic does need to be altered slightly to say that.

Good suggestion...I'll add it in.

>I spent ages today trying to make this work. But even typing in the MappingName didn't work. I checked and double-checked the case of my table and it just won't have it.

>Rather than telling me this will be available sometime next year, what is the actual fix?

Believe it or not, I AM trying to be helpful <s>.

Let's break down the "Setting up MM .NET Windows Forms DataGrids" topic down to the basics:

1. Bare minimum, you need to set the BindingSource property to the name of the associated business object class. For example, "Customer". You can optionally set the BindingSourceMember property to the name of a DataTable or DataTable.DataView. If you are simply binding the DataGrid to the business object's default DataTable you don't have to specify anything in the BindingSourceMember property

2. When you add a new Table Style to the grid, the MappingName property must exactly match the business object's specified TableName property (or the name of an alternate DataTable that you are binding to the grid)

3. When setting up each column, it's MappingName property much exactly match the DataColumn name you are binding to (which by default is the name of the field in the back end table).

In your form, you must register the business object you are binding the grid to in the form's constructor BEFORE InitializeComponent is run.

After InitializeComponent is run (and the user DataGrid is registered with the business object), call a method on the business object to retrieve data. This should populate the DataGrid.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform