Deleting


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Deleting

Hybrid View

  1. #1
    Ricky Guest

    Deleting


    I am Deleting from a DataGrid using a command button. Using a recordset to
    do so. When I select a record
    in the DataGrid and then choose the Delete option everything works just fine,
    but if I don't select a
    record and choose delete it automatically deletes the first record in the
    datagrid. Is there a way that I
    can make sure that a record is selected before the delete works.

    Thanks

  2. #2
    Andrew Grillage Guest

    Re: Deleting

    Check the Datagrid1.SelBookmarks.Count
    If it is 0 then no records are selected.

    --
    Andrew Grillage
    http://vbdata.iwarp.com


    "Ricky" <rickydoyle@hotmail.com> wrote in message
    news:38fee2c6$1@news.devx.com...
    >
    > I am Deleting from a DataGrid using a command button. Using a recordset

    to
    > do so. When I select a record
    > in the DataGrid and then choose the Delete option everything works just

    fine,
    > but if I don't select a
    > record and choose delete it automatically deletes the first record in the
    > datagrid. Is there a way that I
    > can make sure that a record is selected before the delete works.
    >
    > Thanks




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center