Binding fields to datasources

Discussion in 'ASP.NET / ASP.NET Core' started by VTA_Admin, Oct 3, 2008.

  1. I am trying to create a system that will let me insert and edit data into a SQL Server 2005 database. I have created a foreign key from my table to another table that provides a lookup.

    For example, on my main table I have company, and product. I use a product ID that is then located via my foreign key in a look up table.

    When I add a new record, I want a drop down list in my data entry to select the product by name, and not the product ID.

    I have not found a way to do this with the gridview, formview, details view, or listview in both add and edit modes.

    Is there an easy way to do this? It should be simple.

    Thanks.
     
  2. Thanks! I appreciate the quick response.


    I viewed the videos and realized I have a dataset to create and a bunch of c# code to write.


    I had really hoped there was some automated way through the tools. Am I missing something?
     
  3. I was able to view the dynamic data set capabilities, and they are impressive. In 5 mintues, I was up and editing tables with foreign key drop down lists.

    Do you know when they will usable on this site?
     
  4. Hi,
    I think the final updates are scheduled for 08 October.
    The DASP crew is keeping us updated if you watch the update threads above.
    Salute,
    Mark
     
  5. Hi,
    Depending on what you want to do it can be easier.
    Once all the servers on DASP have the new updates I'll illustrate some of the new Dynamic features.
    You can however create a dataset and listview to do a lot with no code.
    The important thing to remember is you must have a Primary Key on the Table and that PK must not allow NULLs.

    Scott Guthrie just posted some Dynamic Data links:
    http://weblogs.asp.net/scottgu/archive/2008/10/02/october-2nd-links-asp-net-asp-net-mvc-asp-net-dynamic-data.aspx
    Salute,
    Mark
     

Share This Page