I encourage you to use whatever works for you in a given context, what will help you get the job done quickly, and employ techniques that you understand.And a big strategy is to use whatever approach works in an application even if it means mixing styles—custom versus data sources and binding. They key is to get done quickly with dependable and maintainable results. You may contact him for technology questions at [email protected] me, I have found that enterprise applications and applications of even modest complexity require a lot of business rules and control, and managing everything from scratch supports that from the get go.

formview itemupdating example-29formview itemupdating example-17

The Data Value Field and Data Text Field's are assigned to Customer ID and Company Name respectively, and lookup values will come from the Customers table.

The Eval method in the script block implies that the Selected Value is read from the outer data source's Customer ID field.

To demonstrate data binding for a Drop Down List in a Form View switch the Form View to the Edit Item Template.

You can use the Smart tags menu or switch to the ASP.

Paul Kimmel is the VB Today columnist for has written several books on object-oriented programming and . Paul Kimmel is a Technical Evangelist for Developer Express, Inc, and you can ask him about Developer Express at [email protected] read his DX blog at

I just finished a small commitment with the Lansing Give Camp, which was sponsored in part by Developer Express and am looking forward to seeing some of you at Tech Ed in Los Angeles.If you use Eval as shown above then you will have to set the value when it changes in the Form View Ittem Update event (see Listing 1). NET showing all of the elements generated by the designer (or added by you) is provided in Listing 2.If you switch Eval to Bind for the Selected Value then no code-behind is required. It took me a couple of hours to work out the details in a manner I was happy with.NET view and replace the Customer ID Text Box with a Drop Down List.Next you will need to configure the data source for the Drop Down List and bind the Drop Down List to the source for the list items and the source for the selected value. Defines the content for the empty data row displayed when the Form View control is bound to a data source that does not contain any records.