|
-
November 9th, 2008, 11:48 AM
#1
Rmove selected row from datagridview
I tried this code to remove the selected row in DataGridView but didn't succeed with can you help please?
Code:
Dim i As Integer = DataGridView3.SelectedRows.Count
Me.DataGridView3.Rows.RemoveAt(i)
-
November 9th, 2008, 02:12 PM
#2
Re: Rmove selected row from datagridview
Here is:
DataGridView3.Rows.Remove(DataGridView3.CurrentRow)
-
November 9th, 2008, 03:18 PM
#3
Re: Rmove selected row from datagridview
Yes, your first attempt was tring to remove one past the last row which actually exists, and had nothing to do with selection....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|