Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a Business Object
Message
 
À
21/11/2004 10:54:32
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00963260
Message ID:
00963347
Vues:
8
Hi Bonnie.. thanks for your reply.

Can this be done visually ?
(In VFP terms , what would be the equivalent of the ControlSource property ?)

My grid is bound to a Dataset

Regards,

Gerard



>Hi Gerard,
>
>Number One is your answer. Once you bind your text boxes to the same Table that the grid is bound to, the values in the text boxes should be from whatever row you're on in the grid. So, something like this:
>
>this.MyTextBox1.DataBindings.Add("Text", MyDataSet.MyGridTable, "MyColumn1");
>this.MyTextBox2.DataBindings.Add("Text", MyDataSet.MyGridTable, "MyColumn2");
>
>
>~~Bonnie
>
>
>>Hi.
>>
>>I've just created my forst Business Object in .Net which stores all records into a DataSet, which is displaying nicely in a grid.
>>
>>I now want to amend 'One' of the records in the grid, and am wondering whats the best way to tackle this. (I would prefer to do this in a separate 'Edit' Tab on the page rather than in the grid itself)
>>
>>I reckon my options are:
>>
>>1. Is there an automatic way that I can 'Simple' bind the fields of the 'current' record in the existing dataset (I dont know if this can be done or how to do it)
>>
>>2. Copy the particular record I want to amend out to another 'dataset' and use 'Simple Data Binding' to bind to each field in this second dataset
>>
>>3. Dynamically Create Properties of my Business Object which would be the field names of the dataset, and then bind these to the text boxes etc.
>>
>>Option no. 3 would seem to me to be the most 'Object Oriented' but I am open to any suggestions on how to accomplish the best result.
>>
>>Regards,
>>
>>Gerard
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform