Link to home
Start Free TrialLog in
Avatar of tommychiu
tommychiuFlag for United States of America

asked on

How to delete record with datagrid?

Can you tell me how to delete record in datagrid?

Ex:
id(Invisible)           Date              Aggregate          Network            System         Application            Delete
1                          Dec 2007         100.00                 97.00               100.00           100.00                Delete
2                          Dec 2007         100.00                 90.50               88.00             100.00                Delete

The id column is invisible.
Avatar of mokule
mokule
Flag of Poland image

Have You tried
                this.Datagrid1.Rows.RemoveAt(0)  ?
Avatar of tommychiu

ASKER

How's that work? Is it will remove the record from my sql table completely?
No it won't remove.
You need to call Update method of a TableAdapter to which Your datagrid is bind
ASKER CERTIFIED SOLUTION
Avatar of monarch_ilhan
monarch_ilhan
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial