Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Add,Edit,Delete with a business object
Message
From
04/05/2005 12:14:02
Scott Butts
Ims Specialty Services
Twin Falls, Idaho, United States
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Newbie Add,Edit,Delete with a business object
Miscellaneous
Thread ID:
01010823
Message ID:
01010823
Views:
70
I am attempting to learn the MM .Net Framework and have some questions. I am sure these questions are really basic and have simple answers but I haven't be able to figure any of them out. Thanks in advance for any and all help.

I have created a business object and set RetrieveAutoIncrementPK = true, database and table name, created a method to retrieve records by ID. This all seems to work. The problem I am running into to is actually using the business object on my form to edit and add data. After creating and registering (RegisterPrimaryBizObj) my business object with my form (mmBusinessForm) I call the GetEmptyDataSet method and the fields on my form that are tied to the business object are disabled, except my check boxes. Why are my check boxes still enabled?

To add new records I have tried using both a mmButtonNew and adding code to mmButton, as in the jump start, making a call to the business objects NewRow method. This appears to be adding records fine once save is called but the ID field (which is marked as the key field) gets a value of 0 initially then once the record is saved the value changes to the correct new primary key value. How to I get the correct primary key value when the NewRow method is first called? Should I be calling the NewRow method from the business object directly? Is there a sample in the developers guide other then the Jump Start on adding records using business objects?

My next question is once a new record is added and saved, repeated calls to NewRow appears to added new records in the current business objects dataset but how do I navigate off the current record and to the newly added record? Looking at the jump start a data grid is used and the grids NavigateData method is called. I am not using a datagrid on this form. Shoould I be using it for navigating records? If I make it visible = false when the form is loaded the grid is still visible.

One last question, I am using a mmPicker object to allow the user to select a record to edit. When the picker form is displayed the user is able to change the data that is being displayed, how to I disable this feature?
Next
Reply
Map
View

Click here to load this message in the networking platform