Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie: Enhancing the DataGrid
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01069412
Message ID:
01073077
Vues:
22
Greg,

>>> One other thing to check...if the MappingName property of the DataGrid's TableStyleCollection doesn't match the name of the DataTable you are binding to the DataGrid, then your column settings will not appear at run time. Check the TableName property of your OrderDetail business object to make sure it matches what you have specified in the MappingName property (or vice-versa <s>)./
>
>That solved part of the difference. I had missed setting the TableName property to OrderDetail vs. OrderDetails when creating the business object. I can see the correct code in step 7 but it isn't highlighted as something to change. Did I mess up earlier?
>
>Now the column headers display the custom header text but they still don't display when the grid is empty. The Order grid behaves the same. Other than colors and fonts, the properties appear to be the same as the sample grid.

Unfortunately, the default behavior of the .NET Windows Forms grid is to not display columns until the first time you bind to it. You can bind an empty DataSet to the grid and then the columns will appear.

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
Répondre
Fil
Voir

Click here to load this message in the networking platform