Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with New button
Message
 
À
22/07/2008 09:36:53
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
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:
01332870
Message ID:
01333328
Vues:
9
This message has been marked as the solution to the initial question of the thread.
Tim,
I thought you would be interested in the solution for this. I got it from Josh Horne at OakLeaf. I had to add the following code in order to position the pointer to the end of the table.
this.BindingContext[oBizObject.GetCurrentDataSet(), "TableName"].Position = oBizObject.GetCurrentDataSet().Tables["TableName"].Rows.Count - 1;
Thanks for all your help.

>Linda,
>
>I think I duplicated this behavior. In the form constructor have you set the grid as the NavControl?
>this.NavControl = this.grdMyGrid;
>
>Tim
>
>>>
>>>Here are a couple more questions. Is this form a mm Maintenance form?
>>>I am curious to know if the record is being added in the right datatable and if the values you are changing are being set. Maybe you are just not positioned on the new row.
>>>
>>>Check out the dev guide section "Using Specialized Buttons" under "Creating Windows Forms Applications". There is a section in there about positioning to the new row after it is added. For some reason if your record is added but it is not positioned to that new row, maybe this would do the trick.
>>>Tim
>>
>>Tim,
>>It is a mmBusinessForm. I noticed in the developers' guide that it mentions using that as the basis if you want to develop a custom form. I don't really like having the tab page already on there because you can't rename the first two tabs. When I started this form, I had expected to have more than two tabs and wanted to have more control over the names. It had occurred to me, though, that this might cause some problems. I hadn't gotten around to investigating the differences.
>>
>>I do have the BindingSource set to the table I want and the binding for all the controls, including the New button, is to the primary table for the business object. I checked the State property for the relevant business object and it showed the state as Added. It does act as if it's not positioned on the new row. I'll check out the "Using Specialized Buttons" section. That sounds promising. Thanks again for all your help.
Linda Harmes
HiBit Technologies, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform