GridView INSERT Edit DELETE with no PK problem

Discussion in 'ASP .Net' started by Oded Dror, Feb 25, 2007.

  1. Oded Dror

    Oded Dror Guest

    Hi there,

    I'm using VWD 2005 Express and SQL Server 2005 Express

    When I have a table with Primary key ASP.NET let you add INSERT EDIT and
    DELETE button to the GridView
    But when you don't have PK you can not

    My question how to add the EDIT INSERT Buttons to the GridView without
    having the PK on the table?

    Should I use Stored Proc for that?

    Thanks,
    Oded Dror
    Oded Dror, Feb 25, 2007
    #1
    1. Advertising

  2. Oded Dror

    Jared Guest

    On 25 Feb, 14:10, "Oded Dror" <> wrote:
    > Hi there,
    >
    > I'm using VWD 2005 Express and SQL Server 2005 Express
    >
    > When I have a table with Primary key ASP.NET let you add INSERT EDIT and
    > DELETE button to the GridView
    > But when you don't have PK you can not
    >
    > My question how to add the EDIT INSERT Buttons to the GridView without
    > having the PK on the table?
    >
    > Should I use Stored Proc for that?
    >
    > Thanks,
    > Oded Dror


    Don't really know much about the express versions, but how about using
    an int with Is Identity set to yes as your primary key. That way you
    don't need to worry about providing a value.

    Regards

    Jared
    Jared, Feb 26, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UGxheW1ha2Vy?=
    Replies:
    2
    Views:
    3,376
    =?Utf-8?B?UGxheW1ha2Vy?=
    Aug 8, 2005
  2. =?Utf-8?B?a2Vu?=
    Replies:
    1
    Views:
    10,309
    Wiktor Zychla [C# MVP]
    Jan 23, 2006
  3. Tomo Tomo

    DataGrid with edit,insert & delete but with no ViewState !?

    Tomo Tomo, Nov 7, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    135
  4. Jaime Stuardo

    GridView control enters edit mode when I click Edit link twice

    Jaime Stuardo, Apr 7, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    377
    Jaime Stuardo
    Apr 7, 2006
  5. Replies:
    0
    Views:
    209
Loading...

Share This Page