How to delete a row or datas from datagridview in vb.net?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Prathap
    New Member
    • Nov 2011
    • 37

    How to delete a row or datas from datagridview in vb.net?

    I am a beginner in vb.net, i dont know how to delete datas from datagridview in vb.net.
  • pod
    Contributor
    • Sep 2007
    • 298

    #2
    1. capture the id of the selected row of data
      (the row must contains the id in one of the cells, hidden or not)
    2. build and submit a query to delete this record
      (delete from table where id = [caopture ID])
    3. refresh the datagrid datasource
      (run the query you used to load the datagrid previously)

    Comment

    Working...