Delete a row from datagrid 
Author Message
 Delete a row from datagrid

How to delete a row at run-time from a DataGrid Control ?
Is there a datagrid method ?

For e.g: I have a datagrid row that lists Customers (using
DataAdapter\DataStore\ DataTable). How can i delete say
the 5th customer ?

Thanks!



Sat, 04 Jun 2005 01:14:23 GMT  
 Delete a row from datagrid
What you have to do is eliminate the record from the
underlying dataset.

Here's some code to delete the current row of the datagrid:

   Dim myTable As DataTable
   Dim myRow As DataRow
   myTable = DataSet1.Tables(0)
   myRow = myTable.Rows(DataGrid1.CurrentCell.RowNumber)
   myRow.delete

HTH

-Lee

Quote:
>-----Original Message-----
>How to delete a row at run-time from a DataGrid Control ?
>Is there a datagrid method ?

>For e.g: I have a datagrid row that lists Customers
(using
>DataAdapter\DataStore\ DataTable). How can i delete say
>the 5th customer ?

>Thanks!
>.



Sat, 04 Jun 2005 01:25:27 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DELETE all rows in datagrid

2. Deleting a Row in Datagrid

3. How to delete multiple rows in DataGrid Control 6.0

4. delete multiple rows in DataGrid

5. How to delete selected rows in datagrid which has been bound with recordset?

6. How to delete a row in a datagrid.

7. Delete a row in a Datagrid using VB.net

8. DataGrid row delete

9. How to delete row from datagrid

10. Datagrids, DataSets and deleting Rows

11. DataGrid: how to handle deleted rows

12. Disable Delete row function in Datagrid

 

 
Powered by phpBB® Forum Software