TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ako Musha
NA
28
12.2k
How to delete all the empty rows in a datagirdview?
Oct 26 2018 2:00 PM
I would like to delete the empty rows from a column. Here is what I've tried but does not work, I am getting an error as "use 'new' keyword to create an object instance"!
Your help would be appreciated, thanks so much.
For
i= data.Rows.Count - 1
To
0
Step
-1
Dim
row
As
DataGridViewRow = data.Rows(i)
if (
Not row
.IsNewRow Andalso data.Rows(i).Cells(1).Value.Tostring() =
""
)
Then
data.Rows.RemoveAt(i)
Else
End
If
Reply
Answers (
3
)
How to convert values in Datagridview from String to Double?
importatnt inquiry