Visual Studio 2010 problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omglol
    DK Veteran
    • Jan 2009
    • 1890

    #1

    Visual Studio 2010 problem

    Hello!

    I am doing simple master/detail form in Visual Studio 2010 and I am stuck with a problem.

    I have two tables, first one is Clients (ClientID, FirstName, LastName, Address, TelephoneNumber) and the second one is Vehicles (RegistrationNumber, Brand, Model, Power, EngineCode, MakeYear). Clients are displayed by GridView and each Client has Select button on the left side. When I click Select, DetailsView opens for that client with a list of his cars. So far, so good. The problem is that I can only delete existing cars of the client, while Edit and Insert buttons are not working (I get error - ClientID cannot be NULL). Here is my question - how to tell DetailsView that when I want to edit/insert new car, to use the ClientID from selected row in GridView?
Working...