Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ability to add not enabled in grids
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 2.0
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01336675
Message ID:
01337144
Vues:
11
Linda,

>I have 2 grids on a tab page in a business form. They are very simple and the users would like to enter data directly. I set the AllowUserToAddRows property to true. ReadOnly is false and Enabled is true. I made sure to create an instance of the related business objects. However, when I run the program, the grids are not enabled. I added code to specifically enable them in the Enter method but it didn't help. Currently, those tables are empty, but that shouldn't make a difference. What else do I need to do? Thanks.

Try setting the grid's AutoSetEnabled property to false...

That said, you typically don't want to enable the default Microsoft "Add New Row" funtionality because it simply adds a new record to the data source and completely bypasses the business object--which means it won't run any new "Hook" code, including setting default values.

Best 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