Add auto increment column in datagrid

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Melson

    #1

    Add auto increment column in datagrid

    Hi

    Can anyone help me. I would like to create a product entry form which has 2
    tables in ms sql. First table is product header which contain product code
    and second table is product detail which contain product code, item... etc.
    Product detail table will be displayed in a datagrid.

    So far I've completed most of the coding except the item in the product
    detail table. The item should be able to automatically increment eg. 1,2,3
    item mean it has 3 product detail records. However, when I delete second
    records (item 2), how can I update the third item (3 item) to second item (2
    item).


    Please help. Thanks

    Regards
    Melson


  • Cor Ligthert

    #2
    Re: Add auto increment column in datagrid

    Melson,

    If you have not yet an existing. Try than to avoid the automatically
    increment.
    It gives only a lot of trouble.

    Try to use a guid to create unique identifiers.
    http://msdn.microsoft.com/library/de...classtopic.asp

    I hope this helps,

    Cor


    Comment

    Working...