Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web Form Binding?
Message
De
07/06/2004 15:46:46
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00908254
Message ID:
00910890
Vues:
16
Kevin,

I have not been successful binding to the datarow property of a biz obj. I have tried to follow the syntax in the developer’s guide but only get errors.

These are the steps I take.

1. Define Public property oOrderDetail as OrderDetailBusiness biz obj
2. Register oOrderDetail as New OrderDetailBusiness bizobj
3. Init DataRow by a call to oOrderDetail.GetDataSet()
4. In property sheet of textbox:
a. BindingSource = OrderDetailBusiness.DataRow (I have also tried
oOrderDetail.DataRow)
b. BindingSourceMember = OrderId

I get an error “can not bind to OrderDetailBusiness.DataRow.OrderId”
What am I missing?

Terry Carroll





>Terry,
>
>>I have set up a test form with order header and order details, similar to the MM Web Jump start example. Using the edit in place from the Grid works just fine. However, I want the option of not editing in the grid but instead add additional text boxes to the form and when a selection is made in the grid I want get the selected row from within the grids “itemcommand” event handler and then on the same postback bind the text box controls to the selected row number.
>
>In this scenario rather than creating an in-place-edit grid, you could create a grid with a hyperlink column (as shown in the Jump Start Guide). When you click on the hyperlink, you can call back to the page with a specific ID which can then be used to retrieve an individual row for editing.
>
>>The second scenario is similar but does not have a grid on the form.
>>I have a form with only order detail text boxes. The order detail query is placed in session from another page that in turn calls this page to edit one row. That row number is also saved to session. In the orederdetail load I call the SetCurrenDataSet passing in the dataset in session, this binds the form, but only to the first row in the dataset. How can bind to the row number I have set in session?
>>From the load I want to bind to Row Session(“RowNum”) in Session(“dsDataset”)
>
>Again, the easiest solution here is to get the primary key of the selected row, pass that to the Detail form and retrieve that individual row from the back end.
>
>As an alternate option, you can bind to the DataRow property of the business object as described in the MM .NET Developer Guide topic "Data Binding Web Controls to Alternate Data Sources".
>
>Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform