How to delete the record from DataGrid?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to delete the record from DataGrid?

  1. #1
    Ken Guest

    How to delete the record from DataGrid?


    In my VB 6 project i use Datagrid control to present the record information
    from SQL SERVER by ADO objects pointing to all records by default.

    I checked the properties ( Allow Delete,Allow Add, Allow Modify) of Datagrid
    control, when I highlighted one record and click Delete from key borad, the
    record sounds disappearing from GUI of Grid. When I click one button which
    supposedly close the existing recordset, open new one and assign to datagrid
    datasource, the deleted record pups up again. The delete functionality is
    not commited. How to solve this kind of problem?

    Thanks!

  2. #2
    Anu Guest

    Re: How to delete the record from DataGrid?


    Since you have bound the control with the recordset,delete the row from recordset
    and refresh the grid.It will reflect in both front end and back end.

    Regards,

    Anu


    "Ken" <zhao790@hotmail.com> wrote:
    >
    >In my VB 6 project i use Datagrid control to present the record information
    >from SQL SERVER by ADO objects pointing to all records by default.
    >
    >I checked the properties ( Allow Delete,Allow Add, Allow Modify) of Datagrid
    >control, when I highlighted one record and click Delete from key borad,

    the
    >record sounds disappearing from GUI of Grid. When I click one button which
    >supposedly close the existing recordset, open new one and assign to datagrid
    >datasource, the deleted record pups up again. The delete functionality is
    >not commited. How to solve this kind of problem?
    >
    >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